forked from ceph/seastar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently, a task object is single use. After calling task::run(), the reactor deletes the task, so it cannot be re-entered. This patch lays the groundwork to re-entering tasks that were already run once by moving the deletion of the task from the reactor to task::run() itself. Normally, a task will delete itself after running, but it may also choose not to do so, and it can then schedule itself again. To avoid confusion, task::run() is renamed to task::run_and_dispose(). Good candidates for resumable tasks are looping primitives like repeat() and C++ coroutines.
- Loading branch information
Showing
3 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters