-
Notifications
You must be signed in to change notification settings - Fork 12
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
refactor starting/stopping ProviderThreads #58
Conversation
How was this tested? |
private Thread worker; | ||
private long interval; | ||
private AtomicBoolean running = new AtomicBoolean(false); | ||
private AtomicBoolean stopped = new AtomicBoolean(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need stopped?
public void stop() { | ||
running.set(false); | ||
public boolean isRunning() { | ||
return running.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need running var in this class now?
private final Host us; | ||
private final Kademlia dht; | ||
private final Queue<Cid> newBlocksToPublish; | ||
|
||
private final ControlSubThread cidProvider; | ||
|
||
private final ControlSubThread newCidProvider; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to put a generic type on these to make it easier to tell what it is doing from the type, like before?
No description provided.