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.
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 aLewisException
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.