Skip to content

NH-124863 Add thread safety to TokenBucket#712

Merged
tammy-baylis-swi merged 3 commits intomainfrom
NH-124863-tokenbucket-threadsafe
Dec 1, 2025
Merged

NH-124863 Add thread safety to TokenBucket#712
tammy-baylis-swi merged 3 commits intomainfrom
NH-124863-tokenbucket-threadsafe

Conversation

@tammy-baylis-swi
Copy link
Copy Markdown
Contributor

Adds threading.Lock for thread safety; essentially a with lock loop added to most functions. Also adds a fork re-init handler to recreate the lock for TokenBucket, for cases like pre-fork servers. Similar to upstream BatchProcessor.

@tammy-baylis-swi tammy-baylis-swi requested review from a team as code owners November 27, 2025 22:29
Copy link
Copy Markdown
Contributor

@raphael-theriault-swi raphael-theriault-swi left a comment

Choose a reason for hiding this comment

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

LGTM !

@tammy-baylis-swi tammy-baylis-swi merged commit e1a39ec into main Dec 1, 2025
64 checks passed
@tammy-baylis-swi tammy-baylis-swi deleted the NH-124863-tokenbucket-threadsafe branch December 1, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants