Jon,
Probably too many classes and lines to post them. But you reminded me.
Originally my single thread program use one sql connect pool with default
its properties which has 100 connections inside. All jobs done by one
object, the object at least talks to SQL Server 5 times. Then I changed the
program by manually start 30 worker threads and each thread runs with one
object (each object has different target to avoid dead lock issue). Then the
worst case, some threads cannot get the sql connection. The UI is only
updated by main thread.
I will increase the connection number in the sql connection pool and try
again.
Thanks,
Mark
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Mark <mx*@rogers.com> wrote: It's a windows application and will query data multiple times from SQL
Server, does some calculation and update the table with the results.
I did some test for that with threading. I initialed 30 threads and
started them. Only some were executed and others looked like never started. What
did it happen? I missed something?
Without seeing your code, it's impossible to tell. The connection pool
may be throttling the number of concurrent connections to your server
though. Also if you're updating your UI from the worker threads, that
would cause problems.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too