Closed MrBrixican closed 6 months ago
This should be fixed in #68
Merged that in! I agree we should probably also not allow registering new modules during shutdown...
OK, I also don't allow new modules to be registered during shutdown. Should all be good now!
Currently, we shutdown modules in the same order we register them. This may not be ideal in cases where a module may depend on modules registered before it in its shutdown method (one notable example is a game module cleaning up audio resources dependent on an earlier registered audio module). To support such scenarios, it may be best to shutdown modules in reverse order.
Care must be taken for the unlikely edge case of modules being registered during shutdown (perhaps this should be disallowed entirely).