# CoroutineWaitList.hpp
This File On Github
Ask A Question
API: latest
module: oatpp
#include "oatpp/core/async/CoroutineWaitList.hpp"
# CoroutineWaitList
List of oatpp::async::Coroutine waiting to be notified.
namespace oatpp { namespace async {
class CoroutineWaitList {}
}}
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | CoroutineWaitList | Multiple implementations:
|
[none] | ~CoroutineWaitList | Virtual destructor. |
void | setListener | Set wait list listener. |
void | notifyFirst | Put first-in-list coroutine back to its processor. |
void | notifyAll | Put all coroutines back to its processors and clear wait-list. |
# CoroutineWaitList::CoroutineWaitList
- Deleted copy-constructor.
- @param other
CoroutineWaitList(const CoroutineWaitList&) = delete
- Default constructor.
CoroutineWaitList() = default
- Move-constructor.
- @param other
CoroutineWaitList(CoroutineWaitList&& other)
# CoroutineWaitList::~CoroutineWaitList
Virtual destructor. Will call notifyAllAndClear().
virtual ~CoroutineWaitList()
# CoroutineWaitList::setListener
Set wait list listener.
Listener will be called when processor puts coroutine on a wait-list.
- @param listener
void setListener(Listener* listener)
# CoroutineWaitList::notifyFirst
Put first-in-list coroutine back to its processor.
void notifyFirst()
# CoroutineWaitList::notifyAll
Put all coroutines back to its processors and clear wait-list.
void notifyAll()
# CoroutineWaitList::Listener
Listener for new items in the wait-list.
namespace oatpp { namespace async {
class CoroutineWaitList {
class Listener {}
};
}}
# Methods
Return Type | Name | Summary |
---|---|---|
[none] | ~Listener | Default virtual destructor. |
void | onNewItem | Called when new item is pushed to the list. |
# CoroutineWaitList::Listener::~Listener
Default virtual destructor.
virtual ~Listener() = default
# CoroutineWaitList::Listener::onNewItem
Called when new item is pushed to the list.
- @param list - list where new item was pushed to.
virtual void onNewItem(CoroutineWaitList& list) = 0