Suppose I have a event handler which makes two AJAX calls to the server:
$(\"#foo\").click(function(){
$.get(\"bar\", function(){ alert(\"Hello\"); });
Yes, JavaScript is single threaded, so your execution will never get preempted.
Asynchronous callbacks and events work the same way; your handler for mousedown is guaranteed to finish before your handler for a mouseup, even if your mousedown handler takes 2 seconds and you let the mouse go immediately.
The same goes for an AJAX callback, it gets put into the same (kind of) queue as events waiting to be processed