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...