13
0

Temporal: add TempoMap::use() which returns the per-thread ptr-to-tempo-map without updating the pointer

This commit is contained in:
Paul Davis 2020-08-04 12:37:29 -06:00
parent 7446de72b1
commit b1271a491e

View File

@ -612,7 +612,8 @@ class LIBTEMPORAL_API TempoMap : public PBD::StatefulDestructible
static SerializedRCUManager<TempoMap> _map_mgr;
public:
static void update_thread_tempo_map() { SharedPtr p = _map_mgr.reader(); _tempo_map_p.set (&p); }
static SharedPtr fetch() { update_thread_tempo_map(); SharedPtr p = *_tempo_map_p.get(); return p; }
static SharedPtr use() { return *_tempo_map_p.get(); }
static SharedPtr fetch() { update_thread_tempo_map(); return use(); }
/* and now on with the rest of the show ... */