From 1b8170fc1d70089e253eb9a77abdd6601d94f6bf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 6 Mar 2010 10:23:19 +0000 Subject: Save Ingen patches as working standard LV2 plugin bundles. This allows you to create an Ingen patch in Ingen running as a Jack client, save it, then load that patch as an LV2 plugin in any LV2 compliant host. Eliminate (hopefully) all static data in the engine (for multiple instantiations in a single process). More API/ABI stable interface for Ingen::Shared::World. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2533 a436a847-0d15-0410-975c-d299462d15a1 --- raul/Thread.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'raul/Thread.hpp') diff --git a/raul/Thread.hpp b/raul/Thread.hpp index 4d5cef3..a9300b1 100644 --- a/raul/Thread.hpp +++ b/raul/Thread.hpp @@ -18,6 +18,7 @@ #ifndef RAUL_THREAD_HPP #define RAUL_THREAD_HPP +#include #include #include #include @@ -59,8 +60,8 @@ public: const std::string& name() const { return _name; } void set_name(const std::string& name) { _name = name; } - unsigned context() const { return _context; } - void set_context(unsigned context) { _context = context; } + bool is_context(unsigned context) const { return _contexts.find(context) != _contexts.end(); } + void set_context(unsigned context) { _contexts.insert(context); } protected: Thread(const std::string& name=""); @@ -92,11 +93,11 @@ private: /* Once-only initialisation of the key */ static pthread_once_t _thread_key_once; - unsigned _context; - std::string _name; - bool _pthread_exists; - bool _own_thread; - pthread_t _pthread; + std::set _contexts; + std::string _name; + bool _pthread_exists; + bool _own_thread; + pthread_t _pthread; }; -- cgit v1.2.1