> 
> 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.)
Ah, I believe your right.  The solution is to not use a BlockingQueue, but
rather a BlockingStack.  That way reclaimed threads get used in preference
over new threads.

> 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    
>  ....

Thats due to the fact that the JVM is using native threads, which are ==
to Linux processes but with a shared VM context.  Annoying in PS, but
perfectly normal.

> 
> 
> By the way I still would like the recode the thread package :-)
> 
And I still don't think its necessary. :)

        Scott

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20000803/b57f0adc/attachment.pgp>

Reply via email to