Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a .NET service exhibit thread agility?

Related to questions like this and this about ASP.NET thread agility: Can a windows service written in C# exhibit the same thread agility behavior seen in ASP.NET? Or is thread agility more a feature of IIS than .NET?

Really what I'm after is can I be sure that thread management within a windows service is entirely up to the service itself? Or can .NET hop threads within a long-running service if it chooses to do so?

like image 541
sbrown Avatar asked Dec 25 '22 19:12

sbrown


2 Answers

No. A windows service is not managed by the IIS pipeline and any threads that are created must be created by the service code itself.

like image 153
John Wu Avatar answered Dec 27 '22 07:12

John Wu


Thread agility is IIS specific. Windows service will not have that behaviour.

like image 21
Riad Baghbanli Avatar answered Dec 27 '22 09:12

Riad Baghbanli