On 3/18/09, Chris Lusena <[email protected]> wrote:
>
>  Can you access the main loop of the processing (CPU bound) thread?
>  If so you could try using time.sleep() to stop the cpu bound thread for a 
> moment and give others a shot at the interpreter. Also you could 
> (restructuring your project) put the processing in another process via 
> something like os.popen or subprocess (in 2.6/3.0), sockets or pipes for 
> communication, nice the process if necessary. Unix process are cheep, more 
> advice I have read on the subject boils down to multi-process where possible 
> or multi-threading With a quick glance at documentation I could not find a 
> way to set a priority of a thread under python ether.
>
>  --
>  Chris

Changing a thread priority is one of those things that's not in Python
right now, and will not be for the foreseeable future.

Doing a grep for "pthread_attr_setschedparam" in the Python source
code reveals nothing (on 2.2.2 and 2.4.6, the source tarballs I have
unpacked right now.)

Due to the Global Interpreter Lock, I'm not sure it would even be a
good idea to have prioritized threads, even though you could do it if
you write a few lines of C code.

-Mark C.

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to