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

Any ideas about cancellation? #12

Open
Subuday opened this issue Jun 5, 2024 · 4 comments
Open

Any ideas about cancellation? #12

Subuday opened this issue Jun 5, 2024 · 4 comments

Comments

@Subuday
Copy link

Subuday commented Jun 5, 2024

As far as I understand, task structure should have some sort of is_canceled variable? And there should check before calling callback. What is your vision on cancelling process?

@kprotty
Copy link
Owner

kprotty commented Jun 10, 2024

Given task memory is intrusively provided, if it never invokes the callback due to a cancellation request then how can it free the Task? Furthermore, not all tasks are inherently cancellable (especially ones that must do so asynchronously or are blocking). I think users should implement their own cancellation if they need it. Would recommend a CancellationToken pattern if so.

@Subuday
Copy link
Author

Subuday commented Jun 12, 2024

Thanks.

@Subuday Subuday closed this as completed Jun 12, 2024
@Subuday
Copy link
Author

Subuday commented Jun 12, 2024

Could you recommend some materials, blogs, etc about intrusively memory? I've never seen/used this...

@Subuday
Copy link
Author

Subuday commented Jun 12, 2024

I mean only from got about this thing only from your post =) By the way, incredible work. Amazing deep dive in thread pool

@Subuday Subuday reopened this Jun 13, 2024
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

No branches or pull requests

2 participants