calling functions at the same time

bobb rawbobb at hotmail.com
Sat May 1 14:08:19 EDT 2004


"Bart Nessux" <bart_nessux at hotmail.com> wrote in message
news:c6unuq$d0f$1 at solaris.cc.vt.edu...
> 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.
>
The network guy in me says that pinging 4 machines at the same time from 1
machine is not fair and
balanced.  your network card really only does 1 request at a time... I would
think that the only fair judge
is to do it on 4 machines on the same segment, or 4 cards in the same
machine, otherwise you're bottleneck
becomes the single network card..
My opinion...
bobb

>
>
> > 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