Skip to content

Conversation

@trask
Copy link
Member

@trask trask commented Jan 8, 2020

No description provided.

@trask trask added this to the 2.6.0-BETA.2 milestone Jan 8, 2020
@trask trask self-assigned this Jan 8, 2020
@littleaj littleaj self-requested a review January 8, 2020 23:01
Copy link
Contributor

@littleaj littleaj left a comment

Choose a reason for hiding this comment

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

Some comments below.

Also, I noticed we synchronize register but not the "stop all" loop. I think we should synchronize in both places.

If I could rewrite this operation (just thinking out loud):

  • I would add shutdown(), shutdownNow() and awaitTermination(long, TimeUnit) to TelemetryClient.
  • The resources of each instance would be tracked within that instance.
  • The user of a TelmetryClient instance should be sure to call shutdown to cleanup its resources.
  • The shutdown hook action would have a WeakHashMap (as you did here) of TelemetryClient references to close any still alive during JVM exit. A new instance would register itself here.

@trask trask merged commit 7c5b53e into master Jan 13, 2020
@trask trask deleted the trask/fix-channel-fetcher-oom branch February 3, 2020 17:40
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.

3 participants