Opened 7 years ago
Closed 7 years ago
#11716 closed Bugs (fixed)
::then(f) should inherit the parent Executor
Reported by: | viboes | Owned by: | viboes |
---|---|---|---|
Milestone: | Boost 1.60.0 | Component: | thread |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: |
Description
In the ::then documentation we can read
"When the scheduler or launch policy is not provided the continuation inherits the parent's launch policy or scheduler. "
This has not been implemented and so the program terminates :(
In order to implement it we need to type-erase the executor, so that we can use it to launch the continuation.
Change History (4)
comment:1 by , 7 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 7 years ago
Milestone: | To Be Determined → Boost 1.60.0 |
---|
comment:3 by , 7 years ago
After some more thoughts, I believe that then(cont) should result in the continuation been called on an unspecified thread of execution, as the Concurrency TS says.
If the user wants to use the same executor it could do
f.then(launch::executor, cont);
or
f.then(launch::inherit, cont);
comment:4 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
This commit contains a fix for this issue as well as the addition of the VERY-EXPERIMENTAL promise::set_executor and packaged_task::set_executor. These should be replaced by constructor.
https://github.com/boostorg/thread/commit/b8db8fef8b28414d16c66761badc1c6fcadfc38f