Skip to content

Conversation

@javier-aliaga
Copy link

@javier-aliaga javier-aliaga commented Jun 19, 2025

Issue describing the changes in this PR

resolves previous TODO
Interrupt worker thread on stop

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

public void start() {
new Thread(this::startAndBlock).start();
this.workerThread = new Thread(this::startAndBlock);
this.workerThread.start();
Copy link
Author

Choose a reason for hiding this comment

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

This is the real change

private final TaskHubSidecarServiceBlockingStub sidecarClient;
private final boolean isExecutorServiceManaged;
private volatile boolean isNormalShutdown = false;
private Thread workerThread;
Copy link
Author

Choose a reason for hiding this comment

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

This is the real change

* it is the responsibility of the supplier to take care of them.
*/
public void close() {
this.workerThread.interrupt();
Copy link
Author

Choose a reason for hiding this comment

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

This is the real change

@javier-aliaga javier-aliaga marked this pull request as ready for review June 19, 2025 11:47
Copy link
Collaborator

@cicoyle cicoyle left a comment

Choose a reason for hiding this comment

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

thx Javi!

@cicoyle cicoyle merged commit 5094800 into dapr:main Jun 23, 2025
2 checks passed
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