-
Notifications
You must be signed in to change notification settings - Fork 10
Description
This is a feature proposal which I also added to BWAPI: bwapi/bwapi#873 -- it's a quality-of-life feature that has no particular need to synchronize with mainline BWAPI though, so I've added it here separately
Real-time performance requirements in competition disincentivize bots from logging directly to disk. The incentive is instead to flush logs at the end.
However, if a client bot's pipe connection to StarCraft is broken, no further event handlers are called, leaving the bot without a last-ditch chance to flush logs.
Proposed feature: An onTermination() handler which is always called after a game, even in event of disconnection. This handler is called with the expectation that BWAPI is no longer accessible. This would allow bots a chance to flush any logs if they haven't already.