Ignore:
Timestamp:
2019-07-03T16:59:49Z (6 years ago)
Author:
Jaroslav Jindrak <dzejrou@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
46c66f8
Parents:
96fec16
Message:

cpp: write tests for <future> and fix minor bugs they found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/__bits/thread/promise.hpp

    r96fec16 r8e24583  
    109109                }
    110110
     111                /**
     112                 * Useful for testing as we can check some information
     113                 * otherwise unavailable to us without waiting, e.g.
     114                 * to check whether the state is ready, its reference
     115                 * count etc.
     116                 */
     117                aux::shared_state<R>* __state()
     118                {
     119                    return state_;
     120                }
     121
    111122            protected:
    112123                void abandon_state_()
     
    250261                try
    251262                {
    252                     this->state_->set_value(forward(val), false);
     263                    this->state_->set_value(forward<R>(val), false);
    253264                    aux::set_state_value_at_thread_exit(this->state_);
    254265                }
Note: See TracChangeset for help on using the changeset viewer.