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

[C++] Investigate spawning arbitrary callbacks from StopToken #28663

Open
asfimport opened this issue Jun 2, 2021 · 5 comments
Open

[C++] Investigate spawning arbitrary callbacks from StopToken #28663

asfimport opened this issue Jun 2, 2021 · 5 comments

Comments

@asfimport
Copy link
Collaborator

asfimport commented Jun 2, 2021

In some situations, we may want to forward stop requests to external runtimes, e.g. gRPC (see #10318 ), without polling.

Ideally, one may temporarily add a callback to a StopToken. This bears complications, especially in the case where the stop request comes from a signal handler.

Reporter: Antoine Pitrou / @pitrou

Related issues:

Note: This issue was originally created as ARROW-12938. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Antoine Pitrou / @pitrou:
Possibly related: ARROW-11916

@asfimport
Copy link
Collaborator Author

@asfimport
Copy link
Collaborator Author

Todd Farmer / @toddfarmer:
This issue was last updated over 90 days ago, which may be an indication it is no longer being actively worked. To better reflect the current state, the issue is being unassigned per project policy. Please feel free to re-take assignment of the issue if it is being actively worked, or if you plan to start that work soon.

@asfimport
Copy link
Collaborator Author

David Li / @lidavidm:
It looks like this should be possible now, using a self-pipe and a thread? There'll also be a little fiddliness to register and unregister callbacks (assuming a StopToken is meant to be sharable among multiple actions).

@asfimport
Copy link
Collaborator Author

Antoine Pitrou / @pitrou:
Yes, this is possible even without a separate thread. But you're right there's some API design work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant