Permalink
Browse files

shim old locker interface.

  • Loading branch information...
1 parent e48ee9e commit ac42a9e2956298ade3dc683b18d7a9f15ef1477f @cowboyd cowboyd committed Jun 15, 2011
Showing with 18 additions and 0 deletions.
  1. +18 −0 lib/v8/c/locker.rb
View
@@ -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

0 comments on commit ac42a9e

Please sign in to comment.