checkThreadAndEnqueue
public static <T extends INetHandler> void checkThreadAndEnqueue(Packet<T> packetIn,
T processor,
IThreadListener scheduler)
throws ThreadQuickExitException
Handles pumping inbound packets across threads by checking whether the current thread is actually the main thread
for the side in question. If not, then the packet is pumped into the handler queue in the main thread so that it
can be handled synchronously by the recipient, it then throws an exception to terminate the current packet
handler thread.
- Throws:
ThreadQuickExitException