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

refactor starting/stopping ProviderThreads #58

Closed
wants to merge 5 commits into from

Conversation

kevodwyer
Copy link
Member

No description provided.

@ianopolous
Copy link
Member

How was this tested?

private Thread worker;
private long interval;
private AtomicBoolean running = new AtomicBoolean(false);
private AtomicBoolean stopped = new AtomicBoolean(true);
Copy link
Member

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();
Copy link
Member

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;
Copy link
Member

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?

@kevodwyer kevodwyer closed this Oct 18, 2023
@kevodwyer kevodwyer deleted the fix/provider-thread-model branch October 26, 2023 06:34
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