|
|
|
|
|
by superjared
5365 days ago
|
|
When I did multi-threaded Ruby stuff (shudders) I wrote a simple lock block using either an object or a symbol as the lock identifier. The resulting code looked like: lock(some_obj) do
// synchronized code here
end
Using a mechanism like that you can add synchronization to Ruby without any new syntax. |
|