[ZODB-Dev] RE: [Zope] Re: Squid headaches
Sun, 1 Jun 2003 22:41:31 -0400
> In other (i.e. non-Zope) code, I saw code like:
> sleep(0) # indicate, threads should switch, if necessary
> Of course, "sleep(0)" may not force a thread switch on all platforms.
sleep(0) definitely forces a thread to yield its timeslice on Windows,
definitely does not on Solaris, and "beats me" for everything else. Windows
is happy to switch threads frequently without this kind of trickery, though.
> My lock time optimization holds the lock only while it decides
> whether it has finished. It looks like:
Sorry, I don't know the packing code well enough to comment.