No output from threads
Jeff Shannon
jeff at ccvcorp.com
Thu Apr 4 15:10:34 EST 2002
In article <a8i0pv$bu6$1 at news.rchland.ibm.com>, ldw at us.ibm.com
says...
> I made the command look like: "start /belownormal /wait cmd /c
> myprog.exe -opt 3 >out3.txt". No joy.
> Then I tried: "cmd /c start /belownormal /wait myprog.exe -opt 3 >out3.txt".
> Also no joy.
>
> Finally I went for simplicity and tried just: "myprog.exe -opt 3 >out3.txt".
> And it works. The only problem with this is that messages printed out while
> the threads are running are a little confusing. I have only one window for
> both threads and can't tell one message with another. I guess I'll put up
> with that for now.
A word of warning, though -- you may not be getting much usage of
your second processor. Python itself has a Global Interpreter
Lock, forcing only one Python thread to be running at any given
time. Secondary threads are not run on multiple processors. You
may not be having this problem, since you're executing external
programs -- I'd imagine that those could be scheduled on the
second processor, but you should verify this.
In general, Python doesn't make effective use of SMP. Hopefully
this will be fixed eventually, but it's a huge undertaking.
--
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list