By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

need to suspend/resume a child thread

P: n/a
A child thread has a long-time executions, how to suspend it and resume
back the orignial place ?
I know it' nature to use singal, but child thread cannot get signal as
Python Manual say. And i dnt like to check status variable as the
long-time executions can not or be dirty to stop to do check.
Nov 13 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello,
A child thread has a long-time executions, how to suspend it and resume
back the orignial place ?
I don't think you can do it using Python's thread API.
You can either use a platform specific API (such as pywin32) or make
the thread "cooperative" and wait on a condition/semaphore in some
inner loop.
I know it' nature to use singal, but *child thread cannot get signal as
Python Manual say. *And i dnt like to *check status variable *as the
long-time executions can not or be dirty to stop to do check.
Threads and signals don't play well together. Not recommended.

HTH,
--
Miki <mi*********@gmail.com>
http://pythonwise.blogspot.com

Nov 13 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.