This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | jnoller |
|---|---|
| Recipients | Rhamphoryncus, amaury.forgeotdarc, benjamin.peterson, gregory.p.smith, jnoller, mikemccand, pitrou, tzot |
| Date | 2008年07月17日.17:35:03 |
| SpamBayes Score | 0.030245433 |
| Marked as misclassified | No |
| Message-id | <1216316104.84.0.394980632663.issue874900@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
To add to ben's comment, under py3k the third test hangs, if you pull
out the basic script code being executed in subprocess:
if 1:
import sys, os, time, threading
# a thread, which waits for the main program to terminate
def joiningfunc(mainthread):
mainthread.join()
print('end of thread')
if 1:
main_thread = threading.current_thread()
def worker():
childpid = os.fork()
if childpid != 0:
os.waitpid(childpid, 0)
sys.exit(0)
t = threading.Thread(target=joiningfunc,
args=(main_thread,))
print('starting worker')
t.start()
print('joining worker')
t.join() # Should not block: main_thread is already stopped
w = threading.Thread(target=worker)
w.start()
You'll note it hangs promptly at the join() |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年07月17日 17:35:05 | jnoller | set | spambayes_score: 0.0302454 -> 0.030245433 recipients: + jnoller, gregory.p.smith, mikemccand, tzot, amaury.forgeotdarc, Rhamphoryncus, pitrou, benjamin.peterson |
| 2008年07月17日 17:35:04 | jnoller | set | spambayes_score: 0.0302454 -> 0.0302454 messageid: <1216316104.84.0.394980632663.issue874900@psf.upfronthosting.co.za> |
| 2008年07月17日 17:35:04 | jnoller | link | issue874900 messages |
| 2008年07月17日 17:35:03 | jnoller | create | |