Also mutex lock in Channel::retain

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2012-07-05 17:25:41 +02:00
parent 777e97de2e
commit 3dc4e3cdca
2 changed files with 151 additions and 139 deletions
+22 -21
View File
@@ -33,30 +33,31 @@ namespace love
{
namespace thread
{
class Channel : public love::Object
{
private:
Mutex *mutex;
Conditional *cond;
std::queue<Variant*> queue;
bool named;
std::string name;
Channel(const std::string &name);
class Channel : public love::Object
{
private:
Mutex *mutex;
Conditional *cond;
std::queue<Variant*> queue;
bool named;
std::string name;
Channel(const std::string &name);
public:
Channel();
~Channel();
static Channel *getChannel(const std::string &name);
public:
Channel();
~Channel();
static Channel *getChannel(const std::string &name);
void push(Variant *var);
Variant *pop();
Variant *demand();
Variant *peek();
int count();
void clear();
void push(Variant *var);
Variant *pop();
Variant *demand();
Variant *peek();
int count();
void clear();
void release();
}; // Channel
void retain();
void release();
}; // Channel
} // thread
} // love