-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
broker.py is not waiting for all threads to be finished #59
Comments
Thanks for reporting! |
Please note, that the Python interpreter shutdown w/o `IPRoute.release()` of `IPDB.release()` is permitted now only in the interactive mode. In scripts, it is required to call `.release()` routines before exit. Bug-Url: #59
Fixed. Please notice, that now usage of
and the same for IPDB:
The
I had to remove the deamonic flag from threads a long time ago, but didn't 'cause of the interactive interpreter. Now they become daemons only when one runs pyroute2 from the interactive Python shell, otherwise one must explicitly call Is that ok? |
works like a charm! |
You're welcome! |
I did not dig now very deep into it.
If I run a script which adds and removes some IPs form an interface the scripts ends before all threads are done yet.
Would be nice if loop.py would catch this and block until all threads are finished.
Exception in thread Thread-1 (most likely raised during interpreter shutdown):
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
File "/usr/local/lib/python2.7/dist-packages/pyroute2/iocore/broker.py", line 152, in run
File "/usr/lib/python2.7/threading.py", line 404, in wait
File "/usr/lib/python2.7/threading.py", line 259, in wait
<type 'exceptions.TypeError'>: 'NoneType' object is not callable
The text was updated successfully, but these errors were encountered: