38#ifndef _EXECUTOR_ASYNCNOTIFIABLEBLOCK_HXX_
39#define _EXECUTOR_ASYNCNOTIFIABLEBLOCK_HXX_
73 LOG(
VERBOSE,
"block notifiable %p returned pool size %u",
99 for (
unsigned i = 0; i < num_parallelism; ++i)
127 DIE(
"Should not receive this notification");
DynamicPool * mainBufferPool
main buffer pool instance
Notifiable class that can act as a BarrierNotifiable but also be enlisted in a queue.
void notify() override
Notification implementation.
void check_one_count()
Checks that there is exactly one count in here.
A block of BarrierNotifiable objects, with an asynchronous allocation call.
AsyncNotifiableBlock(unsigned num_parallelism)
Constructor.
BarrierNotifiable * initialize(QMember *entry)
Turns an allocated entry from the QAsync into a usable BarrierNotifiable.
void notify() override
Notification implementation – should never be called.
std::unique_ptr< QueuedBarrier[]> barriers_
The pointer to the block of barriernotifiables.
~AsyncNotifiableBlock()
Destructor.
unsigned count_
How many barriers do we have.
See OSMutexLock in os/OS.hxx.
A BarrierNotifiable allows to create a number of child Notifiable and wait for all of them to finish.
unsigned count_
How many outstanding notifications we are still waiting for.
Notifiable * done_
Notifiable to call when the barrier reaches zero.
An object that can schedule itself on an executor to run.
Asynchronous specialization of Q.
void insert(QMember *item, unsigned index=0)
Add an item to the back of the queue.
Essentially a "next" pointer container.
#define LOG(level, message...)
Conditionally write a message to the logging output.
static const int VERBOSE
Loglevel that is usually not printed, reporting debugging information.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.
#define DIE(MSG)
Unconditionally terminates the current process with a message.
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.