[SERVER-24479] Make the 'Notification' class be able to return a value Created: 08/Jun/16  Updated: 14/Jul/16  Resolved: 12/Jun/16

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: None
Fix Version/s: 3.3.9

Type: Task Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Sharding 16 (06/24/16)
Participants:
Linked BF Score: 0

 Description   

We have places in the server, which need to use a std::promise-like kind of synchronization, which can pass back a result. We should extend the Notification class so it can support returning a value.



 Comments   
Comment by Githook User [ 15/Jun/16 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-24479 Remove misleading and unnecessary =default declarations from Notification<T>.

Notification isn't default-movable because it contains a mutex and a condition_variable.
Explicitly declaring an =default move constructor doesn't bring it into existence or
enable movability.
Branch: master
https://github.com/mongodb/mongo/commit/dbc622a54d22c48892a6b1fda50e07906a257eab

Comment by Githook User [ 12/Jun/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-24479 Fix lint failure due to missing newline
Branch: master
https://github.com/mongodb/mongo/commit/d3c14ff7864b8784a498cf4476ddfc1b6b4fcfd5

Comment by Ian Whalen (Inactive) [ 12/Jun/16 ]

lint failure:
https://evergreen.mongodb.com/task/mongodb_mongo_master_enterprise_rhel_62_64_bit_lint_9d7981ac25bae25c7764c44eb6bd58942a1aae43_16_06_10_22_02_27

Comment by Githook User [ 10/Jun/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-24479 Make 'Notification' class be able to return a value
Branch: master
https://github.com/mongodb/mongo/commit/9d7981ac25bae25c7764c44eb6bd58942a1aae43

Comment by Kaloian Manassiev [ 08/Jun/16 ]

The wait methods will accept operation context and will support cancelability.

Comment by Andrew Morrow (Inactive) [ 08/Jun/16 ]

How would that differ from future<void> or shared_future<void>?

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