This allows users to wait for any outstanding bugsnag requests to finish before exiting, e.g.:
client = Client()
client.notify(some_exception)
client.session_tracker.start_session()
# some time later
try:
client.flush(timeout_ms=2000) # timeout after 2 seconds
# the event & session have both been delivered
except:
pass # timeout was exceeded
sys.exit()
Goal
This allows users to wait for any outstanding bugsnag requests to finish before exiting, e.g.: