diff options
author | Dave Nicponski <daven@google.com> | 2014-02-22 22:24:33 -0500 |
---|---|---|
committer | Dave Nicponski <daven@google.com> | 2014-03-03 17:00:11 -0500 |
commit | 168ec74a34743e3b2dc295ada9ccecbc689cf441 (patch) | |
tree | 3fdc392d72c6906893210eda09bd62248e79f9a3 /system/include | |
parent | 7dc8c2ff08e46c9d9a88ba44bf221a404eeb1e5e (diff) |
Allow multiple worker responses (via messages) if desired.
Add unit test for multiple worker responses.
Test command:
python tests/runner.py browser.test_worker_api_3
Add self to authors file.
Diffstat (limited to 'system/include')
-rw-r--r-- | system/include/emscripten/emscripten.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index b6e6307b..918059f2 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -377,10 +377,15 @@ void emscripten_destroy_worker(worker_handle worker); void emscripten_call_worker(worker_handle worker, const char *funcname, char *data, int size, void (*callback)(char *, int, void*), void *arg); /* - * Sends a response when in a worker call. Should only be - * called once in each call. + * Sends a response when in a worker call. Both functions post a message + * back to the thread which called the worker. The _respond_provisionally + * variant can be invoked multiple times, which will queue up messages to + * be posted to the worker's creator. Eventually, the _respond variant can + * be invoked, which will disallow further messages and free framework + * resources previously allocated for this worker call. */ void emscripten_worker_respond(char *data, int size); +void emscripten_worker_respond_provisionally(char *data, int size); /* * Checks how many responses are being waited for from a worker. This |