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

Made ManagedTrackerHost timer a daemon thread #35

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

cdwhatcott
Copy link
Contributor

I added the boolean flag to the Timer constructor to make it's associated thread a daemon. The reason for this change is because I am using Moji client in a console application and the timer threads are preventing the application from terminating after it has completed its processing.

@@ -58,7 +58,7 @@
}

ManagedTrackerHost(InetSocketAddress address) {
this(address, new Timer(), Clock.INSTANCE);
this(address, new Timer(true), Clock.INSTANCE);
Copy link
Member

Choose a reason for hiding this comment

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

Looks OK to me, @hrchu any thoughts on this based on how you're using moji? Are there any use cases where one would want the timer to prolong the life of the application? If someone did want that I think they should probably do it within their app rather than having it be a side effect of this Timer.

Copy link
Member

Choose a reason for hiding this comment

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

@massdosage agree with you. @cdwhatcott thanks for contribution!

@massdosage massdosage merged commit 8ad2052 into mogilefs-moji:master Jul 7, 2017
@cdwhatcott cdwhatcott deleted the daemon-timer branch July 7, 2017 14:22
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