ISISComputingGroup / lewis-ess

Let's write intricate simulators!
GNU General Public License v3.0
21 stars 19 forks source link

Lewis hangs when Adapter.start_server raises an exception #243

Closed MichaelWedel closed 7 years ago

MichaelWedel commented 7 years ago

The adapter collection waits until the adapter thread has started properly (and blocks until startup is complete), if that does not happen due to an exception, Lewis hangs forever and sometimes can't be exited with ctrl + c.

There are multiple solutions to this, either a timeout on wait in the caller with a LewisException being raised immediately or handling the exception in the startup code, setting the flag there. But that would eat the exception entirely, I think the first option is cleaner. The only question is where does the timeout come from. We could start by using a magic number (to fix the immediate problem) and refine it from there.