-
Notifications
You must be signed in to change notification settings - Fork 120
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
catch requests from invalid thread #255
Conversation
And then some follow-ups:
|
It seems that the import path hook is not thread safe, we'll need to either disallow path_hook imports on threads or use a cached copy of rtp. |
Please try latest commit |
Looks good so far.... when merging, please keep the first commit too, so that the problem can be more easily diagnosed later on. Thank you! |
@@ -165,6 +166,15 @@ def request(self, name, *args, **kwargs): | |||
present and True, a asynchronous notification is sent instead. This | |||
will never block, and the return value or error is ignored. | |||
""" | |||
if (self._session._loop_thread is not None and | |||
threading.current_thread() != self._session._loop_thread): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this use self._thread_invalid()
?
No description provided.