1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to ensure web worker process only last message?

Discussão em 'Angular' iniciado por tlzg, Outubro 10, 2024 às 04:22.

  1. tlzg

    tlzg Guest

    I have a scenario where it might happen that user produces events rapidly (hovers, e.g.). Each hover sends a message to web worker to do some calculation. Each new message should cancel the previous one and I need to be sure only last one will be processed and its result returned back to UI thread.

    How can I make sure that web worker processes only last message it receives? I would like to avoid any debounce time as its important that delay is minimal.

    Continue reading...

Compartilhe esta Página