Hi everyone,
I am attempting to create a server side application for panda3d clients to connect to.
With this in mind, I figured I could run the server side panda3d app in a thread, but this has been problematic.
For those of us developing servers, it would really be nice if panda3d could support being run not on the main thread. I can get it to work by commenting out the signal.signal calls in Task.py, but this is not a good solution.
So it seems like Task.py needs to be changed to explicitly support a multi-threaded environment.
I would like to be able to capture the ctrl+c or sigint events from my mainthread, and use that to do cleanup of other modules/subsystems as well as get panda to do graceful cleanup.
Commenting out the signal.signal calls practically ensures the ctrl+c will come at a bad time, say in the middle of Task.step.
As an example of why I want to do this in the first place, suppose you wanted to create some kind of admin or control interface for your game server.
One way would be to run an http server and allow web based control of the server.
In this case, the main thread would start one background thread for the panda portion of the app, and a second thread for the http requests.
Then when the operator hits ctrl+c I can safely shutdown the web server as well as panda.
Is this possible?
Thanks