swarm-support
[Top][All Lists]
Advanced

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

Re: [Q] dynamic scheduling, cleaning up remaining scheduled events


From: Ken Cline
Subject: Re: [Q] dynamic scheduling, cleaning up remaining scheduled events
Date: Fri, 13 Aug 1999 16:40:40 -0400 (EDT)

On Fri, 13 Aug 1999, Marcus G. Daniels wrote:

> - step
> {
>   timeval_t t = getCurrentTime ();
> 
>   printf ("time: %ld\n", t);
>   if (t == 2)
>     {
>       id index = [schedule createIndex: scratchZone
>                            fromMember: getCurrentAction ()];
> 
>       while ([index next: (id *) &t])
>         {
>           printf ("removing: %ld\n", t);
>           [index remove];
>         }
>       [index drop];
>     }
>   return self;
> }

I think I'll tuck this little code nugget away. :-)

One question though, should you drop the members as you
remove them or are the actions possibly referenced by other
objects?

Also, if this was a repeating schedule, would the code above
just remove those actions not yet completed in the current
repeat cycle?

Thanks!

Ken.

_________________________________________________________
Ken Cline                             address@hidden
SAIC                                 VOICE (410) 571-0413
Annapolis, MD                          FAX (301) 261-8427






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



reply via email to

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