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

fix: Set explicit names for each spawned thread #311

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team as a code owner September 27, 2024 19:55
@keelerm84
Copy link
Member Author

If you look at the before and after of the thread descriptions, you can see this working as expected:

Before the change

         <_MainThread(MainThread, started 128980636048256)> True
         <Thread(Thread-1 (_run), started daemon 128980602586816)> True
         <Thread(Thread-2 (_run), started daemon 128980592101056)> True
         <Thread(Thread-3 (_run), started daemon 128980581615296)> True
         <Thread(ldclient.flush.1, started daemon 128980571129536)> True
         <Thread(ldclient.flush.2, started daemon 128980483049152)> True
         <Thread(ldclient.flush.3, started daemon 128980472563392)> True
         <Thread(ldclient.flush.4, started daemon 128980462077632)> True
         <Thread(ldclient.flush.5, started daemon 128980451591872)> True
         <Thread(ldclient.diag_flush.1, started daemon 128980441106112)> True
         <Thread(Thread-10 (_run_main_loop), started daemon 128980430620352)> True
         <StreamingUpdateProcessor(Thread-11, started daemon 128980281722560)> True

After the change

         <Thread(ldclient.events.flush.repeating, started daemon 132121620383424)> True                            
         <Thread(ldclient.events.context-flush.repeating, started daemon 132121609897664)> True                    
         <Thread(ldclient.events.send-diagnostic.repeating, started daemon 132121599411904)> True                  
         <Thread(ldclient.flush.1, started daemon 132121513428672)> True                                           
         <Thread(ldclient.flush.2, started daemon 132121502942912)> True                                           
         <Thread(ldclient.flush.3, started daemon 132121492457152)> True                                           
         <Thread(ldclient.flush.4, started daemon 132121481971392)> True
         <Thread(ldclient.flush.5, started daemon 132121471485632)> True
         <Thread(ldclient.events.diag_flush.1, started daemon 132121460999872)> True
         <Thread(ldclient.events.processor, started daemon 132121312102080)> True
         <StreamingUpdateProcessor(ldclient.datasource.streaming, started daemon 132121301616320)> True  

@@ -172,6 +172,7 @@ class LDClient:

Client instances are thread-safe.
"""

Copy link
Member Author

Choose a reason for hiding this comment

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

I did add some small whitespace fixes in this PR in addition to the thread renames. I figured it was small enough it wouldn't be a big deal.

@keelerm84 keelerm84 merged commit 9c7777c into main Oct 1, 2024
11 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-723/named-threads branch October 1, 2024 18:06
keelerm84 pushed a commit that referenced this pull request Oct 1, 2024
🤖 I have created a release *beep* *boop*
---


##
[9.7.2](9.7.1...9.7.2)
(2024-10-01)


### Bug Fixes

* Set explicit names for each spawned thread
([#311](#311))
([9c7777c](9c7777c))
* Shutdown diagnostic thread if enabled
([#312](#312))
([cde6cfb](cde6cfb))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants