Javascript Web Worker & Parallel Processing
Hello,
I am intending to use JS web worker thread to make an AJAX (xmlhttprequest) call to server in background while user continues to fill the form on main UI thread. My question is what if there is an another server call made from main UI thread (e.g. user submitting form, refreshing UI layouts etc.) while AJAX (raised from worker thread) is still in progress? My assumption is although there are two JS concurrent threads in parallel, still there is just one JAVA thread for given requestor managing all server calls made from browser. Hence in this scenario request made to server from main UI thread will be put on hold until AJAX processing is complete.
Can anyone please confirm my understanding?
Thank you,
Kaivan