You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMHO, instance of Lock class should be supplied from outside. It removes dependency of Election class on Lock class. Also I believe it makes Election class more unit test friendly.
Let me know your thoughts. If you agree, I can send a PR.
The text was updated successfully, but these errors were encountered:
@brendandburns I am confused about lock_callback and lock_lost_callback constructor arguments as their default value are from Lock class itself. If We supply Lock instance from outside of Election class, I am not sure how to handle these two arguments.
There is an instantiation of Lock class inside Election class. This makes Election class dependent on Lock class. You can see instantiation at https://github.com/metaparticle-io/sync/blob/master/python/metaparticle_sync/election.py#L8:21.
IMHO, instance of Lock class should be supplied from outside. It removes dependency of Election class on Lock class. Also I believe it makes Election class more unit test friendly.
Let me know your thoughts. If you agree, I can send a PR.
The text was updated successfully, but these errors were encountered: