R/locks.R

Defines functions makelock

makelock <- function()({
  state = FALSE
  this <- environment();
  function(set){
    if(!missing(set)){
      state <<- set;
      lockEnvironment(this, bindings = TRUE)
    }
    state
  }
})


is_rapache <- makelock()
use_apparmor <- makelock()
jeroen/opencpu documentation built on Aug. 20, 2018, 9:06 a.m.