Thanks Chip, this will be helpful! Unfortunately a different project just came 
up, so I can't actually start work on the semaphore project until I finish.

- Ben

> my outline for this would be as follows. I am not up to v16 yet, so 
> this will be a 'classic' solution, use of call worker might simplify 
> this.
>
> write a deamon (a process which spends most of it's life asleep), is 
> started at server startup.
>  Deamon :
>    repeat loop
>     examine IP array, or Object for data to process
>       if there is stuff to do
>         do it
>         remove processed item from Array/object
>     if on a timed execution : Delay process(Delay time;Current process)
>     if only as an on needed basis : Pause process(current process)
>    until (Quit 4D)
>
>
> Add item to Array/object:
> (on client, adding)
>   Execute on server : method with needed values
>     Set semaphore to protect array/object
>       add as needed
>     clear semaphore
>     wake deamon 
>       if (already running : wake (call process deamon process #))
>       else start deamon
>
> Remove Item from array/object (only runs on server, called from deamon):
>   Set semaphore to protect array/object
>      remove as needed
>   clear semaphore
>
> Chip
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to