diff --git a/lib/v8/c/locker.rb b/lib/v8/c/locker.rb new file mode 100644 index 0000000..be5eeeb --- /dev/null +++ b/lib/v8/c/locker.rb @@ -0,0 +1,18 @@ +module V8 + module C + # 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 + def self.Locker + lock = Locker.new + yield + ensure + lock.delete + end + end +end \ No newline at end of file