kripken/emscripten — pull request #2172 by virusdave (2014-02-27 21:25:27+00:00)
Title: Allow multiple worker responses from a single webworker call.

Very small change, overall.

This slightly modifies the emscripten_worker_respond api to allow workers to send multiple optional preliminary responses before a final response.

It doesn't yet expose the full power of bidirectional message passing that webworkers expose, but is somewhat more useful than the previous implementation, with relatively minimal changes.

The added test case passes for me (and fails if you change the order worker responses are sent in), as do the preexisting webworker tests. As this is a minor change, i didn't run the entire test suite beyond the webworker stuff.