How to make Python poll a PYTHON METHOD
Grant Edwards
grante at visi.com
Thu May 10 10:48:24 EDT 2007
On 2007-05-10, johnny <rampeters at gmail.com> wrote:
> Is it possible to call threads inside another thread (nested threads)?
No. It's not possible to call threads because they're not
callable objects. (I'm assuming you're talking about Thread
objects from the threading module.)
If you're asking if you can create and start threads from a
non-main thread, the answer is yes.
> The example above creates a thread to call a function "eat"
> every time based on a specified interval. Now for example, if
> I make the called function "eat" to spawn threads to do the
> work in a queue and when all jobs are done, spawned threads
> join. When the next interval is up this process repeat
> itself.
OK.
--
Grant Edwards grante Yow! I demand IMPUNITY!
at
visi.com
More information about the Python-list
mailing list