1 #ifndef SIPLASPLAS_SIGNALS_ASYNCSINK_HPP 2 #define SIPLASPLAS_SIGNALS_ASYNCSINK_HPP 5 #include <siplasplas/reflection/dynamic/function_pointer.hpp> 6 #include <readerwriterqueue/readerwriterqueue.h> 7 #include <siplasplas/signals/export.hpp> 35 template<
typename Caller,
typename Function>
51 template<
typename Caller,
typename Callee,
typename Function>
52 AsyncSink(Caller& caller, Callee& callee, Function
function) :
76 void invoke(
const std::vector<cpp::dynamic_reflection::Object>& args)
override;
77 bool invokeWithoutCallee()
const override;
80 moodycamel::ReaderWriterQueue<std::vector<cpp::dynamic_reflection::Object>> _queue;
81 cpp::dynamic_reflection::FunctionPointer _fptr;
86 #endif // SIPLASPLAS_SIGNALS_ASYNCSINK_HPP Definition: canary_allocator.hpp:7
Interface to the signals sink API.
Definition: sink.hpp:39
AsyncSink(Caller &caller, Callee &callee, Function function)
Creates an asynchronous sink given a caller, a callee, and a destination function.
Definition: asyncsink.hpp:52
AsyncSink(Caller &caller, Function function)
Creates an asynchronous sink given a caller and a destination function.
Definition: asyncsink.hpp:36
Implements an asynchronous signal sink suited for communication between different threads...
Definition: asyncsink.hpp:23