You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2023/05/04 13:12:28 UTC

[GitHub] [arrow] paleolimbot commented on pull request #35398: GH-35260: [R] Add s3_init helper for adjusting log level

paleolimbot commented on PR #35398:
URL: https://github.com/apache/arrow/pull/35398#issuecomment-1534758976

   How about:
   
   ```r
   # At the package top level
   s3_state <- new.env(parent = emptyenv())
   s3_state$initialized <- FALSE
   
   s3_init <- function(...) {
     if (s3_state$initialized) {
       return()
     }
   
     # ...
   }
   
   # ...
   s3_bucket <- function(...) {
     s3_init()
     # ...
   }
   ```
   
   (Apologies if this doesn't fix the problem...just spitballing!)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org