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

Add executor.schedule(coro::task<void>) -> bool #295

Merged
merged 2 commits into from
Feb 2, 2025

Conversation

jbaldwin
Copy link
Owner

Completely removes coro::task_container, it isn't necessary as both executors already have m_size counters to track the orphaned task_self_deleting frames.

Closes #292

@jbaldwin jbaldwin self-assigned this Jan 31, 2025
@jbaldwin jbaldwin force-pushed the issue-292/executor_add_schedule_task_fn branch from aca6aad to a7262ad Compare February 1, 2025 19:46
Completely removes coro::task_container, it isn't necessary as both
executors already have m_size counters to track the orphaned
task_self_deleting frames.

* added executor concept spawn(task<void>)
* added thread_pool and io_scheduler schedule(task<T> -> task<T>, this
  cannot be templated on the concept since the return type is dynamic as
far as I can know how to do

Closes #292
@jbaldwin jbaldwin force-pushed the issue-292/executor_add_schedule_task_fn branch from a7262ad to 966eb9e Compare February 1, 2025 20:58
@jbaldwin jbaldwin added the enhancement New feature or request label Feb 1, 2025
@jbaldwin
Copy link
Owner Author

jbaldwin commented Feb 1, 2025

@breakds I've made some additional improvements, if you have a moment a review would be welcome, but no worries if not.

  • Completely removed coro::task_container, it was only duplicating the job of the executor classes
  • Tried to formalize some better ways of the coro::conecpts::executor on how to schedule or spawn a task.

@breakds
Copy link

breakds commented Feb 2, 2025

Hi Josh,

Thanks for the change! Sorry that I am not able to review the code as I am on a trip without my laptop until next Wednesday. Please do not wait for me to submit the change, and I will read the change to learn from you a few days later.

Thanks again!

@jbaldwin jbaldwin merged commit fec6779 into main Feb 2, 2025
37 checks passed
@jbaldwin jbaldwin deleted the issue-292/executor_add_schedule_task_fn branch February 2, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

executor add schedule(task<T>)
2 participants