projectmesa / mesa-viz-tornado

Apache License 2.0
2 stars 8 forks source link

Stop `ModularServer` asynchronously #14

Open jatinkhilnani opened 1 year ago

jatinkhilnani commented 1 year ago

What's the problem this feature will solve? Only way to stop ModularServer is when control is with the user in the terminal and pressing 'Control+c'. When running through IDE, control is no longer with user, there is no direct way to stop the server. Running visualization code throws error, RuntimeError: This event loop is already running or OSError: [Errno 48] Address already in use even after restarting the kernel and/or closing the browser.

Describe the solution you'd like Add a stop() method to ModularServer class.

Additional context N/A