sleep?

Karl M. Syring syring at email.com
Thu Jan 24 21:15:25 EST 2002


"Andrae Muys" <amuys at shortech.com.au> schrieb
> Laura Creighton <lac at strakt.com> wrote in message
news:<mailman.1011889238.20407.python-list at python.org>...
> > > MaximilianScherr
> > > I forgot:
> > >
> > > i would like to just use the thread module.
> > >
> >
> > You have some good reason to not use threading instead?
> > That is what it is there for.  But I haven't been following the
> > discussion.
> >

I recommended threadin to the OP days ago, but he does not get the message.

> I would suggest the order-magnitude increase in complexity you face as
> soon as you introduce multiple threads into a process is a pretty good
> reason to avoid threading if there is a reasonable alternative.

> For something as simple as a delayed function call, SIGALARM is clean,
> adequate, and far safer then a threaded solution.

Why should it? You have to detach your mind from signals/messages and
callbacks. Then everything thread comes quite naturally.

Karl M. Syring

>
> One question worth asking, which hasn't been asked so far, is the
> nature of your application?  If it has an event-loop (ie. pretty much
> any GUI app), most event-loop implementations allow you to register
> delayed function calls.
>
> Andrae Muys




More information about the Python-list mailing list