1 #include "hmbdc/Copyright.hpp"
4 #include "hmbdc/pattern/LockFreeBufferMisc.hpp"
5 #include "hmbdc/time/Timers.hpp"
6 #include "hmbdc/Exception.hpp"
7 #include "hmbdc/Config.hpp"
11 namespace hmbdc {
namespace pattern {
14 friend struct PoolImpl;
16 template <
typename Buffer>
17 friend struct PoolTImpl;
18 friend struct PoolMinusImpl;
21 void stopped(std::exception
const&) noexcept;
22 bool dropped() noexcept;
23 void messageDispatchingStarted(uint16_t threadId) {
24 if (hmbdc_unlikely(!messageDispatchingStarted_)) {
25 messageDispatchingStartedCb(threadId);
26 messageDispatchingStarted_ =
true;
29 void invoked(uint16_t threadId);
36 bool handleRange(
BufIt begin,
37 BufIt end, uint16_t threadId) noexcept;
38 bool handleInvokeOnly(uint16_t threadId) noexcept;
39 virtual void messageDispatchingStartedCb(uint16_t threadId) {}
40 virtual void handleRangeImpl(
BufIt begin,
41 BufIt end, uint16_t threadId){};
42 virtual void invokedCb(uint16_t threadId) {}
43 virtual void stoppedCb(std::exception
const&) {}
44 virtual bool droppedCb() {
return true; }
47 uint64_t poolThreadAffinity;
48 uint16_t droppedCount;
49 uint64_t skippedPoolThreadMask_;
50 HMBDC_SEQ_TYPE nextSeq_ __attribute__((__aligned__(SMP_CACHE_BYTES)));
51 bool interestedInMessages;
52 bool messageDispatchingStarted_;
Definition: Timers.hpp:66
Definition: PoolConsumer.hpp:13
Definition: LockFreeBufferMisc.hpp:89