Concurrency models (was: Timer)

Anthony Briggs abriggs at westnet.com.au
Tue Oct 28 07:00:38 EST 2003


At 11:14 AM +0000 28/10/03, Alex Martelli wrote:
>Anthony Briggs wrote:
>    ...
>>  No, I wrote something that I consider true. I'd consider that after
>>  command to be on a par with Fortran's(?) COME FROM statement in terms
>
>Intercal.  Lawrence Clark's 1973 article about "comefrom" in Fortran
>was satire (just as all of Intercal is).

Ah. I just read the article at 
<http://www.fortran.com/fortran/come_from.html>. Most enlightening ;)

>Note that, in Python, you have that 'after' available any time
>you're running a Tkinter GUI: any Tkinter widget has an 'after'
>method that takes a delay (in milliseconds), a callable object,
>and optionally some arguments, and schedules the callable to
>be called with those arguments after that delay.
>
>It works a charm, btw.

I'll take your word for it. It sounds like a recipe for a lot of hair 
pulling to me. What happens if there's some part of your code that 
you don't want interrupted? eg. database commits, file access, any 
sort of time critical stuff, that sort of thing. Is there a way to 
switch it off?

>  >>my money, the event-oriented model behind the [after]
>>>above is at least as robust as any other.
>>
>>  Yes, that's what I said - only with fewer words :)
>
>I thought you were arguing AGAINST the 'after' functionality,
>and therefore against event-driven programming...?!

Perhaps I was taking his words a little too literally. As far as I 
can tell with threads, etc, they're little better than voodoo. So the 
after statement is at least as robust, even if it's a complete 
horror...

Anthony
-- 
----------------------------------------------------
HyPEraCtiVE? HeY, WhO aRE YoU cALliNg HypERaCtIve?!
aBRiGgS at wEStNeT.cOm.aU
----------------------------------------------------





More information about the Python-list mailing list