[SERVER-36249] TaskExecutor::scheduleWork takes callback by const ref Created: 23/Jul/18  Updated: 27/Oct/23  Resolved: 04/Apr/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1 Desired

Type: Improvement Priority: Major - P3
Reporter: Sara Golemon Assignee: Vojislav Stojkovic
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-36425 Use `unique_function` in `mongo::Future` Closed
Sprint: Platforms 2018-08-13, Platforms 2018-08-27, Platforms 2018-09-10, Service Arch 2018-10-08, Service Arch 2022-04-18
Participants:

 Description   

This prevents the use of non-copyable captures since they would make the lambda non-copyable.



 Comments   
Comment by Vojislav Stojkovic [ 04/Apr/22 ]

The TaskExecutor::scheduleWork function takes callback by rvalue ref now.

Comment by Lauren Lewis (Inactive) [ 02/Nov/21 ]

The Service Arch team is in the process of cleaning up tickets in the backlog. This ticket has not been updated in two years so we are closing it. Please reopen if you think this change is valuable.

Comment by ADAM Martin (Inactive) [ 19/Oct/18 ]

To do this best, it requires threading the use of `unique_function` through a lot more of the codebase than just `TaskExecutor::scheduleWork`.

Generated at Thu Feb 08 04:42:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.