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

added ThreadFactoryWrapper in WorkerFactoryOptions #988

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shijiesheng
Copy link
Member

What changed?

  • added new option in WorkerFactoryOptions to expose user provided ThreadFactoryWrapper
  • added a ThreadFactoryWrapper interface
  • apply threadFactoryWrapper to executors in heartbeat, pollers (both poller executor and poller task executor), SyncActivityWorker and SyncWorkflowWorker.

Why?

By wrapping the ThreadFactory, it is now possible to propagate "context" across threads. Uber internally built a threadlocal storage to propagate context inside executors.

How did you test it?

Unit Test
WIP internal test samples on context propagation

Potential risks

No risk due to it's a new fiel with fallback on original behavior

Release notes

Documentation Changes

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.

1 participant