Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will thread.join() block other clients also?

In an asp.net web application, say everytime the user makes the request, and the page loads, a thread is fired off that uses thread.join() to block execution until it's finished.

Say this thread takes 10 seconds to complete.

Does this mean that if 5 totally seperate users make a request to this page, mere miliseconds after the last, does this mean the last user is going to wait 50 seconds to finish their request? Or is each client request threaded?

like image 307
maxp Avatar asked Jan 24 '26 04:01

maxp


1 Answers

Typically, other users will not be blocked.

However, the call to Join ties up a thread pool thread. Once all threads are in use, subsequent requests must wait for a thread to become available.

like image 127
Jason Kresowaty Avatar answered Jan 25 '26 17:01

Jason Kresowaty



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!