-
Notifications
You must be signed in to change notification settings - Fork 732
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
[+] WebsocketClient thread naming #351
base: master
Are you sure you want to change the base?
Conversation
nazariyv
commented
Jan 26, 2019
- Added kwarg for the name of the main thread of WSC
- Added kwarg for the keepalive thread name
1. Added kwarg in the constructor of the WSC to name the thread on which it runs 2. Added kwarfg for the keepalive thread.
[+] WebSocketClient thread naming
This will be really useful for debugging |
Hey, can we merge this, please? |
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.
Hi! I like the idea for logging/debugging purposes, but I noticed a couple syntax issues. Thanks!
@@ -43,8 +44,8 @@ def _go(): | |||
|
|||
self.stop = False | |||
self.on_open() | |||
self.thread = Thread(target=_go) | |||
self.keepalive = Thread(target=self._keepalive) | |||
self.thread = Thread(target=_go, name=thread_name) |
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.
Should reference self.thread_name instead.
self.thread = Thread(target=_go) | ||
self.keepalive = Thread(target=self._keepalive) | ||
self.thread = Thread(target=_go, name=thread_name) | ||
self.keepalive = Thread(target=self._keepalive, name=keeaplive_thread_name) |
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.
Should reference self.keepalive_thread_name. Also there is a typo in "keepalive"