is time.sleep a thread safe function?

Aahz aahzpy at panix.com
Tue Mar 12 19:22:08 EST 2002


In article <c775a687.0203121547.396ba8a8 at posting.google.com>,
Zihong Lu <zlu at extremenetworks.com> wrote:
>
>Recently, we have seen some weird behaviors in our python application
>in Solaris 2.6, 2.7,and 2.8 platform.  The application is a web based
>server, that uses threads heavily.  It runs fine in Linux and win32
>platforms, but in Solaris, it stopped accepting after ran for couple
>of hours.  One of our guesses is that the time.sleep() used through
>out our application is not thread safe.  Can any one please help us
>eliminate/confirm this factor?  Thanks.

I'd be extremely surprised if time.sleep() were a factor, because it's
implemented using select() on platforms that have it (which probably
includes Solaris).
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

The way to build large Python applications is to componentize and
loosely-couple the hell out of everything.



More information about the Python-list mailing list