Created
March 7, 2014 08:56
-
-
Save tobiashm/9407978 to your computer and use it in GitHub Desktop.
Thread safety for ruby-plsql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "ruby-plsql" | |
require "thread" | |
module PLSQL | |
module SynchronizedProcedure | |
def ensure_tmp_tables_created(overload) | |
@@semaphore ||= Mutex.new | |
@@semaphore.synchronize { super } | |
end | |
end | |
Procedure.class_eval do | |
include SynchronizedProcedure | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment