Add mutex protection on ConversationHandler#1533
Add mutex protection on ConversationHandler#1533jh0ker merged 4 commits intopython-telegram-bot:masterfrom
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. |
jh0ker
left a comment
There was a problem hiding this comment.
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 (
conversationsandtimeout_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.