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 viboes, 7 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 by viboes, 7 years ago

Milestone: To Be DeterminedBoost 1.60.0

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

comment:3 by viboes, 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);

See #11736 and #11737

Last edited 7 years ago by viboes (previous) (diff)
Note: See TracTickets for help on using tickets.