.NET thread scheduling regarding call blocking

Suppose I run 3 threads in a C # application: T1, T2, and T3 and issue Run calls for each.

Typically, a processor will schedule threads cyclically (one processor and all threads have the same priority).

However, suppose Thread T1 issues a web service lock call.

Will it be unloaded immediately or after the completion of its temporary fragment?

As a rule, issuing a network call to a network (or any other call) causes the thread to be in a blocked state?

+4
source share
1 answer

As soon as the thread issues a blocking system call (any request to the IO), it pauses and is only marked as β€œReady” (not yet started) when this system call ends.

So yes, it will be immediately unloaded.

+2
source

Source: https://habr.com/ru/post/1382481/


All Articles