Skip to content

Instantly share code, notes, and snippets.

@evie404
Last active April 5, 2016 00:52
Show Gist options
  • Save evie404/985053d2df4192807e8416e084a703ea to your computer and use it in GitHub Desktop.
Save evie404/985053d2df4192807e8416e084a703ea to your computer and use it in GitHub Desktop.
$$$$$c_shit_mutex = Mutex.new
class RunStuffAsyncPoolBigData
def run
Thread.new do
$$$$$c_shit_mutex.synchronize { c_shit }
run_only_thread_safe_shit_in_here_yo
end
end
def run_only_thread_safe_shit_in_here_yo
# implement
end
def c_shit
# implement
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment