Thread Safety

Tim Peters tim.one at home.com
Mon Jan 29 23:56:10 EST 2001


[Clarence Gardner]
> ...
> For some reason, I thought that the tuple-ness of the construct I
> used would make a difference [to thread-safety].  Why?  Beats me :)

I'll hazard a guess:  the rule of thumb in Python is "if it *looks* atomic,
it is".  "(x, y)" looks pretty atomic to me too; unfortunately (for the rule
of thumb, anyway), it's not.

> ...
> Along those lines, I'm going to repeat a question that I posted about a
> week ago that passed without comment on the newsgroup.

That should tell you that nobody who knows something useful about it is
reading c.l.py exhaustively, yes?  Open a bug report, else you may never get
an answer.

> The issue is the SSL support in the socket module, which raises an
> exception when the reading socket is at EOF, rather than returning an
> empty string.

No answer from me:  don't know anything about it.  Sounds reasonable,
though.  In this case I tried to open an SF bug for you, but SF bug
submission appears busted at the moment.  Dumped it into spam email instead.





More information about the Python-list mailing list