09-29-2012, 11:44 PM
It'd be quite difficult and uselessly complicated to decouple the chunk generator from the plugins in order to use non-blocking queues. I'd say that would be impractical, since a "collision" there is highly improbable - chunk generation-altering plugins are very unlikely to interact with anything else than the generator itself.
The problem with your diagram is that it's too simplified. The arrow from Plugins to Packet handling thread actually goes through other threads and is kinda blocking. Also, there can be multiple packet handling threads (one thread can handle only 63 clients - cSocketThreads limit due to select() OS call limit).
I honestly don't think this is worth "solving" now. Things do work now, let's be an agile team and solve things only when they are actually needed
The problem with your diagram is that it's too simplified. The arrow from Plugins to Packet handling thread actually goes through other threads and is kinda blocking. Also, there can be multiple packet handling threads (one thread can handle only 63 clients - cSocketThreads limit due to select() OS call limit).
I honestly don't think this is worth "solving" now. Things do work now, let's be an agile team and solve things only when they are actually needed