rework request invalidation
authorRobin Gareus <robin@gareus.org>
Thu, 15 Dec 2016 05:11:20 +0000 (06:11 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 15 Dec 2016 05:11:30 +0000 (06:11 +0100)
commita95be76741c29a6ec1eb9684eed1696b3fb405d6
tree60445d9519f26bf6bd5228caaffbbfdae50cb450
parent62b06fa427b4f432f82510f51e4b6920280b17a8
rework request invalidation

This kills 2 birds with 1 stone: Removes the necessity of locks
and makes call_slot() realtime safe (req->invalidation->requests list
push_back). On object destruction, the invalidation-record (IR) itself is
invalidated.

Invalidated IRs are pushed onto a trash-pool and deleted in the event-loop
of the invalidated object (GUI thread) once all requests that reference it
have been processed.

One last detail remains: PBD::signal connect should reference the IR
and disconnect unreference it. This will guarantee that signal emission
will not reference the IR while the pool trash is dropped.
libs/pbd/event_loop.cc
libs/pbd/pbd/abstract_ui.cc
libs/pbd/pbd/event_loop.h