-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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 mutex protection on ConversationHandler #1533
Add mutex protection on ConversationHandler #1533
Conversation
Hey man, this looks good to me, but there should be definitly someone else to look over this cough cough @Eldinnie? cough cough. Can you remove the #Todo line though and either put it in this conversation or in the related issue? Then codacy should be fine with it. |
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.
If you address the TODO, I think this is good
I've addressed the todo, should I squash the commits? |
No need to, we will before merging into master. Just go ahead and make as many commits as you want :) |
@SnowyCoder Now you have the chance to get the true big repo experience™️ 😉 Refer to https://github.com/python-telegram-bot/python-telegram-bot/blob/master/tests/test_conversationhandler.py line 414 and following for inspiration. |
I've been studying the test code and I noticed something strange: the assignment at line 494 (that has moved to 552 in the master branch) is duplicated, it seems like a merge error or a typo. |
@SnowyCoder Interesting find ^^ |
Thanks a lot for your contribution @SnowyCoder! |
Thank you for the support! |
Advances #1029 adding thread safety on the mutable variables of the class (
conversations
andtimeout_jobs
).The original issue also asked to internalize all the other properties but it would incur breaking changes and a lot of refactoring, I'll leave this task to someone more proficient with the codebase.