Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
ASP .Net
ThreadPool problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Guest, post: 491897"] Hi, I have a .NET class which uses the .NET threadpool (using QueueUserWorkItem) to create about 8 threads, which do some work while the parent thread waits for them all to complete, which works fine when referenced from a normal EXE. When I reference this DLL in a webservice however, the threads seem to be created one by one in order, rather than at the same time - it is as if there is only one available thread in the ThreadPool and the rest are being queued. I can see this as I have code that writes the execution order to the event log. In the version referenced from the EXE the order they return is in keeping with what I would expect based on how long each takes i.e., the fastest returns first, the slowest last. From the webservice, they appear in the other they are created. I changed the first thread to sleep for 10 seconds, and it in the webservice it still finished first. The same code from the EXE and it finished last, as you would expect. Any ideas on why this is happening as the performance loss when I use this in the webservice is massive. I read that ASP.Net (or IIS) also uses the ThreadPool, but the system isn't even loaded. I called GetAvailableThreads() which returned 50. Thanks, DAve [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
ASP .Net
ThreadPool problem
Top