Fernando Padilla wrote:

Is there any reason why a new Thread is created and then kept around doing and endless sleep loop ( sleeping for measely 300 millisec ), for every block instanciation?

Could we have the sleep loop be longer ( 10 sec ), and use interrupt to wake it up out of sleep if need be?

Could we create a thread for assembly, then another for disassembly?
(if we have the same classloader, this should work right?)


just asking :) One possible way to design my application is that all "plugins" are blocks ( make sense ), but that doesn't make since if I'm having many,many "plugins" ( like 1000s, but even 100s of threads is not a good idea!! )

Hmm. That is not a good idea for sure. The solution used by Fortress to handle management issues like this is to use the CommandManager from the Excalibur Event package. Essentially, you can have many many commands and a managed number of threads to do all the work. I use a repeating command to give the illusion of a thread locked for each item needing attention, but it only is executed after a configurable time.

Perhaps we need to adopt that for plugin management as well....


--


"They that give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."
                - Benjamin Franklin


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to