1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/lib/v8/c/locker.rb
2011-06-15 08:37:05 -05:00

18 lines
No EOL
418 B
Ruby

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