Need to recursively lock a mutex without a deadlock? I got you covered:
def synch_my_mutex
return yield if @mutex.owned?
@mutex.synchronize do
yield
end
end
-
-
Bingo, was just going to tweet about it. I've not seen it until today.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.