Skip to content

Add IPendingExecutionRequestState interface to expose completion state of SingleExecuteProtector #1447

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

Merged
merged 2 commits into from
Apr 23, 2025

Conversation

lifengl
Copy link
Member

@lifengl lifengl commented Apr 19, 2025

For customized SynchronizationContext implementation, knowing whether a pending request has been completed could allow it to remove completed requests. Because JTF requests are potentially sent to multiple queues, including the JTF internal queue, many of those requests can be processed especially inside low priority or delayed queues. For low priority queue, completed tasks showing up for high memory usages. This new contract provides a way to make improvements.

This is only for advanced scenarios, common JTF consumers would not access the request or have chance to use it incorrectly.

… a pending request

has been completed could allow it to remove completed requests. Because JTF requests are potentially sent to multiple
queues, including the JTF internal queue, many of those requests can be processed especially inside low priority or delayed queues.
For low priority queue, completed tasks showing up for high memory usages. This new contract provides a way to make improvements.

This is only for advanced scenarios, common JTF consumers would not access the request or have chance to use it incorrectly.
@AArnott AArnott changed the title For customized SynchronizationContext implementation, knowing whether… Add IPendingExecutionRequestState interface to expose completion state of SingleExecuteProtector Apr 21, 2025
@lifengl lifengl merged commit d36a21b into main Apr 23, 2025
6 checks passed
@lifengl lifengl deleted the dev/lifengl/allowDetectingCompletedRequests branch April 23, 2025 00:03
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