Module: V8::C

Defined in:
lib/v8/context.rb,
lib/v8/c/locker.rb,
ext/v8/v8_exception.cpp

Defined Under Namespace

Classes: Context

Class Method Summary collapse

Class Method Details

.LockerObject

Shim to support the old style locking syntax. We don’t currently deprecate this because it might make a comeback at some point.

to synchronize access to V8, and to associate V8 with this thread:

Locker() do
  #... interact with v8
end


11
12
13
14
15
16
# File 'lib/v8/c/locker.rb', line 11

def self.Locker
  lock = Locker.new
  yield
ensure
  lock.delete
end