<p>I need a distinct sound to play when a error occurs.  The error is the result of a problem with one of perhaps two hundred barcodes that are being inputted in rapid fire.  The event queue seems to handle keyboard input (which the barcode scanner emulates) first, and playing of my sound second.  So if the barcodes are scanned quickly, the error sound stays in the queue, being bumped by the next scan.</p>

<p>Can I manipulate the priority of the queue?</p>

Javascript is not multi-threaded, so option 2 won't work. And I suspect that the event queue you speak of is the OS's event queue, which isn't likely to accessible from a browser, if at all.
Beyond that, I'm having a little trouble understanding your problem. What is firing the error sound? Is it a
```
keyup
```
, etc event or is it a server side validation that returns an error code or something else?