swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ordering events in a swarm ....


From: xueyue
Subject: Re: ordering events in a swarm ....
Date: Sun, 13 Jun 1999 17:25:35 +0000

Marcus G. Daniels wrote:
> 
> >>>>> "XH" == xueyue  <address@hidden> writes:
> 
> XH> But I was trying a case similar to following following situation: when
> 
> - start
> {
>   count = 0;
>   schedule = [Schedule create: globalZone];
>   [self schedule: 3];
>   [[schedule activateIn: nil] run];
>   return self;
> }
> 
> XH> becomes
> 
> - start
> {
>   count = 0;
>   schedule = [Schedule create: globalZone];
>   [self schedule: 3];
>    [[schedule activateIn: nil] run];
>    [schedule at: 7 createActionTo: objecta message: M(actiona)];
>    [schedule at: 5 createActionTo: objectb message: M(actionb)];
>   // ...more new schedule for 'schedule' object
>   // ...
>    return self;
> }
> 
> XH> where objecta and objectb are two different objects.
> XH> I used your code test this idea. The modified code can be
> XH> compiled, but actiona, actionb, ..., are not excuted. This was what I
> XH> got when I ran my own code.
> 
> Besides Paul's reasonable concern about objecta and objectb being
> instantiated at the time of the call to at:createActionTo:message:,
> one thing that is clearly wrong with this code is that the additions
> at 7 and 5 occur after [[schedule activateIn: nil] run].  If you have
> the goal of revisting that whole pattern of behavior (sans autodrops),
> you could again call [[schedule activateIn: nil] run] with the new
> additions.  Otherwise, they will just sit uselessly in the Schedule
> map datastructure.

does this mean the following will work?


 - start
 {
   count = 0;
   schedule = [Schedule create: globalZone];
   [self schedule: 3];
    [[schedule activateIn: nil] run];
    [schedule at: 7 createActionTo: objecta message: M(actiona)];
    [schedule at: 5 createActionTo: objectb message: M(actionb)];
    
   // ...more new schedule for 'schedule' object
   // ...
   [[schedule activateIn: nil] run];
   // create more objects and actions to schedule, ...
   [[schedule activateIn: nil] run];
    return self;
 }
 


> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.

-- 
Dr Xueyue Huang
Center for Transport Studies
Imperial College 
London SW7 2BU

(+44) 171 594 6037

Attachment: vcard.vcf
Description: Card for Xueyue Huang


reply via email to

[Prev in Thread] Current Thread [Next in Thread]