Re: [boost] [GSoC] Boost.Thread executors proposal
First provide in addition a static polymorphic interface. The template functions submit_at and submit_after would accept any chrono `time_point` and `duration`.
Is this with respect to the granularity of the time point? e.g. nano/micro/mille etc? If it is I'm assuming this would take an executor and then convert the time point to the desired granularity (nanoseconds by default) then add it to the executor.
Second, provide an adaptor that wraps an scheduled executor and makes it a polymorphic one.
Polymorphic with respect to what?
Third, provide an adaptor that wraps an executor, manage the time based operations using a specific thread and forward all the operations to the wrapped executor.
So this would take a reference to an executor or a shared_ptr then spawn a single thread that would loop and add the submitted closures at the desired time to the given executor? Ian, ________________________________________ From: Boost [boost-bounces@lists.boost.org] on behalf of Vicente J. Botet Escriba [vicente.botet@wanadoo.fr] Sent: Friday, March 14, 2014 3:34 AM To: boost@lists.boost.org Subject: Re: [boost] [Boost.Thread][GSoC] Boost.Thread executors proposal Le 13/03/14 04:59, Ian Forbes a écrit :
Hi,
Here is my GSoC proposal for working on the scheduled executors classes. It can be found here: www.cs.mcgill.ca/~iforbe/
This proposal mainly deals with the implementation of classes extending the `scheduled_executor` interface. I have already written thread pool implementations with very similar functionality to the ones proposed.
I feel that the current proposal could use a little bit of touching up so please feel free to leave comments/criticisms.
I would also be willing to take on any other work related to executors such the the dynamic/work-stealing thread pool implementation or the parallel algorithms library and add it into my proposal.
Hi,
I like your proposal on scheduled_executor and possibly extend it to a
priority thread pool. I would let the work-stealing outside the proposal.
Just to note that the closure would not be a std::function
Le 15/03/14 18:20, Ian Forbes a écrit :
First provide in addition a static polymorphic interface. The template functions submit_at and submit_after would accept any chrono `time_point` and `duration`. Is this with respect to the granularity of the time point? e.g. nano/micro/mille etc? No, forget the granularity parameter on Boost.Thread. If it is I'm assuming this would take an executor and then convert the time point to the desired granularity (nanoseconds by default) then add it to the executor. Yes.
Second, provide an adaptor that wraps an scheduled executor and makes it a polymorphic one. Polymorphic with respect to what? N3785 defines a class scheduled_executor that is used polymorphically. The scheduled_executor_adaptor would inherit from this scheduled_executor.
Third, provide an adaptor that wraps an executor, manage the time based operations using a specific thread and forward all the operations to the wrapped executor. So this would take a reference to an executor or a shared_ptr then spawn a single thread that would loop and add the submitted closures at the desired time to the given executor?
Yes, this is a possibility. In this way you can have timed-based task on e.g. a serial executor or any of them. The other is that the adaptor takes two references one to a scheduled executor and the other to an executor. This design allows to share the management of time-based operations between several executors. Vicente
participants (2)
-
Ian Forbes
-
Vicente J. Botet Escriba