TileBusAdapter Thread Safety
The TileBusAdapter has some major thread safety issues... It is sending and processing packets on the ComputerCraft thread instead of the main thread. This is causing a crash when I try to generate a SGWorld.
The woes of not using OpenComputers... it has the option of running callbacks in the main thread...
AFAIK you should be able to use SGTech without CC installed. Don't quote me on that though.
you can use OpenComputers... Sangar has implemented the new API. as for thread safety, looks like I'll either have to:
- make a stupid workaround on the bus adapter and signal CC to get packet responses, or
- fuck CC support.
CC, Y U stupid?
@LordFokas, need you ask that? :P
Alright, here's how we're going to fix this:
- save packets for a while until the next tick.
- send all packets, in the right order on the next tick.
- trigger a signal for each packet to hand the response back to the computer.
I also need to poke Sangar about this so he can do the same on OC's side.
#103 is needed to implement this or packets may get lost between ticks.