threads and sleep?

Mike Meyer mwm at
Tue Jul 5 18:00:04 CEST 2005

Jeffrey Maitland <jeff.maitland at> writes:
> What I would like to do is have say 1 thread use as much of a given
> CPU as possible and if a new thread is started (added) that if a CPU
> is available use it instead of using the same cpu. That way it should
> speed the application up.  The standalone (non-threaded) app uses 90+
> % of a single cpu when in this part of the algorithm, that is why I
> split and threaded that part of the algorithm there to try and speed
> it up because this part is repeated several times.   I can post
> generic code of what I am doing but can't post the actuall code
> because of the confidentially of it.  Thanks again in advance for any
> and all comments (even any spitefull ones)

This kind of fine control over CPU allocation is very
plaform-specific. Some don't allow it at all. If your platform does,
the details on how you go about doing it will vary depending on the

Mike Meyer <mwm at>
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list