Perhaps instead of having a constantly executing loop, you could set
up a Timer and have the loop execute at fixed times.  This way your
worker thread would have free cycles to process the onMessage events?
Or maybe start another instance of a worker to specifically handle the
messages while the other worker processes in the loop?

-s

On Jul 7, 12:29 pm, Sergio Viudes <[email protected]> wrote:
> I wrote a worker that has a big loop. If I send a message to this
> worker while loop is executing, it isn't readed until loop ends. I
> need message can be readed while executing that loop.
>
> Anybody has any ideas?
>
> Thanks

Reply via email to