Question

4
Replies
223
Views
KaivanS7 Member since 2015 2 posts
Ruletronics
Posted: 4 years ago
Last activity: 4 years 4 months ago
Closed

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

System Administration User Interface
Moderation Team has archived post
Share this page LinkedIn