Re: Sync API for workers

On 10/12/13 3:48 PM, James Greene wrote:
> You can only build a synchronous API on top of an asynchronous API if
> they are (a) running in separate threads/processes AND (b) the sync
> thread can synchronously poll (busy loop) for the progress/completion of
> the async thread.

a) is necessary, but for b) it is sufficient for the sync thread to be
able to sleep until a condition/mutex/... is lifted


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Received on Sunday, 13 October 2013 10:06:55 UTC