Method: Rust.exclusive
- Defined in:
- lib/rust/core/rust.rb
.exclusive ⇒ Object
Runs the given block with a mutex. It is mandatory to run any R command with this method.
39 40 41 42 43 44 45 46 47 |
# File 'lib/rust/core/rust.rb', line 39 def self.exclusive result = nil CLIENT_MUTEX.synchronize do @@in_client_mutex = true result = yield @@in_client_mutex = false end return result end |