28 #include <glibmm/threads.h>
54 struct BaseRequestObject;
66 bool valid () {
return _valid.load () == 1; }
68 void ref () { _ref.fetch_add (1); }
69 void unref () { (void) _ref.fetch_sub (1); }
70 bool in_use () {
return _ref.load () > 0; }
84 invalidation->
unref ();
104 static void pre_register (
const std::string& emitting_thread_name, uint32_t num_requests);
107 std::list<InvalidationRecord*>
trash;
130 void* (*factory)(uint32_t nunber_of_requests);
138 #define MISSING_INVALIDATOR nullptr
EventLoop(std::string const &)
virtual Glib::Threads::RWLock & slot_invalidation_rwlock()=0
std::vector< RequestBufferSupplier > RequestBufferSuppliers
static void remove_request_buffer_from_map(pthread_t)
static RequestBufferSuppliers request_buffer_suppliers
std::string event_loop_name() const
static std::vector< ThreadBufferMapping > get_request_buffers_for_target_thread(const std::string &)
static InvalidationRecord * __invalidator(sigc::trackable &trackable, const char *, int)
virtual bool call_slot(InvalidationRecord *, const std::function< void()> &)=0
std::vector< ThreadBufferMapping > ThreadRequestBufferList
static Glib::Threads::Mutex thread_buffer_requests_lock
static void set_event_loop_for_thread(EventLoop *ui)
static void pre_register(const std::string &emitting_thread_name, uint32_t num_requests)
std::list< InvalidationRecord * > trash
static EventLoop * get_event_loop_for_thread()
static Glib::Threads::Private< EventLoop > thread_event_loop
static ThreadRequestBufferList thread_buffer_requests
static void * invalidate_request(void *data)
InvalidationRecord * invalidation
std::function< void()> the_slot
std::atomic< int > _valid
std::list< BaseRequestObject * > requests
PBD::EventLoop * event_loop
pthread_t emitting_thread