Hello,

2012/4/11 rklemme (Robert Klemme) <shortcutter / googlemail.com>:
> nobu (Nobuyoshi Nakada) wrote:
>> It seems natural because the only thread is about to sleep.
>
> I would expect the thread to block indefinitely. Signalling an error here=
 seems to try to be too smart. =A0Even in absence of other threads I can im=
agine conditions under which data is read from the queue (for example a sig=
nal handler).

Interesting.  The error is indeed "false positive."  I did not noticed
signal handler.

But I'm not enthusiastic for your proposal.  It is too conservative.
It will increase too many "false negative."


> But even if an error is signaled here, it is certainly not a deadlock - f=
or that you need at least two threads. =A0This is rather something like "on=
ly blocking thread is suspended (with no chance to wake up)". =A0Maybe that=
 error should be controllable via a switch, e.g.
>
> Thread.single_thread_block_is_error =3D true # default false

Do you have any practical case where you get bothered by the "false positiv=
e"?
If so, please open a feature request ticket with the use case.

--=20
Yusuke Endoh <mame / tsg.ne.jp>