S
Sam Roberts
Can I do Array#push from multiple threads at the same time, and know
that all the objs pushed from the threads are on the Array, in some
indeterminate order? What about Array#delete from multiple threads,
and know it was deleted (though only by one of the threads)?
Can I do Socket#recvfrom and Socket#sendto from multiple threads?
I think the answers should be yes, because ruby threads aren't real
threads, they are more mechanisms for dealing with blocking operations
(like socket calls and explicit Mutex) than threads.
I don't want to start peppering my code with unnecessary
Mutex#synchronize calls!
Cheers,
Sam
that all the objs pushed from the threads are on the Array, in some
indeterminate order? What about Array#delete from multiple threads,
and know it was deleted (though only by one of the threads)?
Can I do Socket#recvfrom and Socket#sendto from multiple threads?
I think the answers should be yes, because ruby threads aren't real
threads, they are more mechanisms for dealing with blocking operations
(like socket calls and explicit Mutex) than threads.
I don't want to start peppering my code with unnecessary
Mutex#synchronize calls!
Cheers,
Sam