calling functions at the same time

Bart Nessux bart_nessux at hotmail.com
Fri Apr 30 19:43:37 EDT 2004


Cameron Laird wrote:

> In article <c6udda$qpv$1 at solaris.cc.vt.edu>,
> bart_nessux  <bart_nessux at hotmail.com> wrote:
>>I need a script to call several functions at the same time. How does one
>>call more than one function simultaneously?
>>
>>
>>
> 
> This has several smart-alecky answers, including "you don't",
> and "with co-routines".  The best way you can help yourself is
> to describe a concrete situation where your (Python?) script
> has a need to call even two functions simultaneously. 

I need to ping 4 hosts at exactly the same time from the  same machine (I
plan to timestamp the pings) to test and measure network conditions over
different routes to different hosts. Putting all the ping hosts in a list
and looping through it is not a fair or balanced way to do this because of
the time differences. 



> It turns 
> out "simultaneously" has a plethora of meanings, and you're the
> only one in a position to get others to understand which you
> have in mind.

I mean it to mean: at the *exact* same time... concurrently. Like runners
starting a race together.

> 
> It'll also help to know whether you mean "function" as specific
> to the Python language, or more abstractly, as a unit of useful
> accomplishment.

Specific to Python.



More information about the Python-list mailing list