I’d really like to be be able to see the size of a worker queue (as David Adams 
and others have said in the past).  In my case I want a one-shot (+1 if the 
worker is running), which doesn’t look doable if the calling process is also 
preemptive - unless I lob everything into the queue with a timestamp.

Why do I want this?  I want to start a sync process which takes 10 seconds or 
so to run (an ideal candidate to run preemptively), which may be called from a 
trigger or another preemptive process.  There may be many thousands of 
simultaneous calls, so I want one call if the worker is not running (semaphore 
is good enough) and one call to add just one to the queue if it is running (to 
mop up data that has changed since the worker executed).

Having a potentially huge queue seems a waste, but I’m struggling for other 
ideas?  Sadly I missed the Summits.

Tony Pollard
Another Dimension
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to