On Sun, 2008-02-03 at 19:33 +0100, Martin Krauskopf wrote:
> Hi I'm encountering a problem with the code in the debugger. The
> scenario bellow[1] always (practically) deadlocks when running under
> JRuby(latest trunk), since server_socket.gets and server_socket.puts
> uses the same monitor. The monitor is first acquired by blocking .gets
> so .puts does not have chance to acquire it and send message to the
> client which would in turn releases the .gets in server -> deadlock.

The problem is not necessarily that the same monitor is used, but rather
that the monitor must be released whilst blocking.

-mental

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to