mirror of
https://github.com/rubyjs/therubyracer
synced 2023-03-27 23:21:42 -04:00
shim old locker interface.
This commit is contained in:
parent
e48ee9e4b8
commit
ac42a9e295
1 changed files with 18 additions and 0 deletions
18
lib/v8/c/locker.rb
Normal file
18
lib/v8/c/locker.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue