O
objectref
Hi to all,
does any one know the default behaviour of ThreadPool when all threads there
are busy and requests are available in the queue ??
I mean, the limit of worker threads a thread pool can host/manage is 25.
If we have 25 busy threads in the pool and at this time we try to queue
another job
there, what will be happened ? Will the pool wait for just one busy thread
to
complete (Blocking operation for the 26 job) and then the new job take it's
place and executes
or it will create and spawn a thread of the Thread class ??
The documentation states that "If all thread pool threads are constantly
busy, but there is pending work in the queue, the thread pool will, after
some period of time, create another worker thread. However, the number of
threads will never exceed the maximum value."
I am very anxious about this because i have built an app that may (at any
given time) have to work in
parallel more thatn 25 threads (pool limit).
The documentation also states that one reason NOT using a ThreadPool but
create and manage Thread
object on your own is when
"If you have a task that might run a long time (and therefore block other
tasks). "
thanks for any light on this!
objectref
does any one know the default behaviour of ThreadPool when all threads there
are busy and requests are available in the queue ??
I mean, the limit of worker threads a thread pool can host/manage is 25.
If we have 25 busy threads in the pool and at this time we try to queue
another job
there, what will be happened ? Will the pool wait for just one busy thread
to
complete (Blocking operation for the 26 job) and then the new job take it's
place and executes
or it will create and spawn a thread of the Thread class ??
The documentation states that "If all thread pool threads are constantly
busy, but there is pending work in the queue, the thread pool will, after
some period of time, create another worker thread. However, the number of
threads will never exceed the maximum value."
I am very anxious about this because i have built an app that may (at any
given time) have to work in
parallel more thatn 25 threads (pool limit).
The documentation also states that one reason NOT using a ThreadPool but
create and manage Thread
object on your own is when
"If you have a task that might run a long time (and therefore block other
tasks). "
thanks for any light on this!
objectref