Hi!
I found some minor problems in the threadpool package.
(Sorry Scot it's me again ;-)
1. On startup of the ThreadPool the EThreads ( Wrapper Object ) get
inserted in the BlockingQueue.
2. ... later on they get dequeued on demand to execute a job.
3. If the EThread has no Thread ---> we create a new one and execute the
Runnable
4. ---> And here is the problem if you execute one job after the next
you create thread after thread until your threadpool has reached
the maximum numbers of threads. ---> only then the old threads get
reused ---> I think this is a problem concerning the way Ethreads
get dequeued the BlockingQueue.
This is not the way it should because maybe in the worst case
you create a new Thread even 30 or more threads are idle.
(Scot please don't say "Look at the code more closely." or
something like that.)
Another thing which is not really a problem but more some kind of feeling:
It looks not so nice if you run ps and you get the following output
because of 40 deamons threads running (maybe it is a special feature of
the blackdown jdk) :
rrkapitz at Luxor:~/Freenet/thread > ps | more
2739 pts/0 00:00:00 java
2740 pts/0 00:00:00 java
2741 pts/0 00:00:00 java
2742 pts/0 00:00:00 java
2744 pts/0 00:00:00 java
2745 pts/0 00:00:00 java
2774 pts/0 00:00:00 java
2804 pts/0 00:00:00 java
2955 pts/0 00:00:00 java
2985 pts/0 00:00:00 java
....
By the way I still would like the recode the thread package :-)
Ruediger
_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev