-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add version of YAMLConfigManager
that allows to run in a non-main thread
#63
Comments
I'd recommend not using an env var; instead, add a param like then turn on that param when instantiating the object from within looper. |
|
@nsheff yep, I agree - the env var was really just to "make it work" without actually committing to changing any |
@simeoncarstens I misspoke earlier when I talked about a But, I have another idea: what is the error type Python spits out if you try to call try:
signal( ... )
except UsedSignalInThreadException as e:
pass # don't register signal handlers when in a thread. I think if yacman did this (for whatever the right exception type is, I made up |
@nsheff sorry for the late reply! I'm not sure I understand why the |
no problem can you let me know exactly what exception is raised? It will reduce the probability of the inadvertent problem you mention if we are specific about the exception. |
Sure! It raises |
This was handled in ubiquerg.ThreeLocker, which is what the future yacman will use, so this problem will be solved in version 1 |
This is co-authored by @simeoncarstens
We are implementing an HTTP API for
looper
(see pepkit/looper#441), and since the HTTP API should be non-blocking, we need to runlooper
in a separate thread. The only thing preventing us from that is theYAMLConfigManager
class that usessignal
to captureCtrl-c
inputs, which only works in the main thread.Could we add a version of
YAMLConfigManager
for non-interactive use that doesn't usesignal
?The commits we've made to run
looper
in a separate thread are pepkit/looper@bd73e0a and pepkit/looper@6483045, this environment variable solution might not be appropriate, and we may think of some other solutions.The text was updated successfully, but these errors were encountered: