Skip to content
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

Update singleton_thread_locals.py #252

Merged
merged 3 commits into from Jun 17, 2020
Merged

Conversation

RobinsonMa
Copy link
Contributor

@RobinsonMa RobinsonMa commented Jun 16, 2020

fix

@coveralls
Copy link

@coveralls coveralls commented Jun 16, 2020

Coverage Status

Coverage remained the same at 93.598% when pulling fda3083 on RobinsonMa:patch-1 into efd6e3e on ets-labs:master.

@rmk135 rmk135 self-assigned this Jun 16, 2020
@rmk135 rmk135 self-requested a review Jun 16, 2020
Copy link
Member

@rmk135 rmk135 left a comment

I've left a comment about provider naming. Take a look, please.
Also change the branch to develop, please.

@@ -15,7 +15,7 @@ def example(example_object, queue):
thread_local_object = providers.ThreadLocalSingleton(object)

# Create singleton provider for thread-safe queue:
queue = providers.Singleton(Queue.Queue)
queue = providers.ThreadSafeSingleton(queue.Queue)
Copy link
Member

@rmk135 rmk135 Jun 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, rename queue to queue_factory. As of now, queue variable overrides the name of the imported module. It's a bad practice. Also queue_factory name will be consistent with thread_factory at line 26.

Copy link
Contributor Author

@RobinsonMa RobinsonMa left a comment

I've changed

@RobinsonMa RobinsonMa changed the base branch from master to develop Jun 17, 2020
rmk135
rmk135 approved these changes Jun 17, 2020
Copy link
Member

@rmk135 rmk135 left a comment

Looks good!

@rmk135 rmk135 merged commit c136663 into ets-labs:develop Jun 17, 2020
@rmk135
Copy link
Member

@rmk135 rmk135 commented Jun 17, 2020

@RobinsonMa , thank you for contribution. It will be on production today.

@RobinsonMa
Copy link
Contributor Author

@RobinsonMa RobinsonMa commented Jun 17, 2020

@rmk135 ,It's my pleasure

@rmk135
Copy link
Member

@rmk135 rmk135 commented Jun 17, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants