mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-26 22:03:24 +08:00
checkpoint. merging win32 code. server on X is currently broken
and client probably is.
This commit is contained in:
@@ -122,4 +122,24 @@ class CThreadRep {
|
||||
#endif
|
||||
};
|
||||
|
||||
//
|
||||
// CThreadPtr -- auto unref'ing pointer to thread rep
|
||||
//
|
||||
|
||||
class CThreadPtr {
|
||||
public:
|
||||
CThreadPtr(CThreadRep* rep) : m_rep(rep) { }
|
||||
~CThreadPtr() { m_rep->unref(); }
|
||||
|
||||
CThreadRep* operator->() const { return m_rep; }
|
||||
|
||||
private:
|
||||
// not implemented
|
||||
CThreadPtr(const CThreadPtr&);
|
||||
CThreadPtr& operator=(const CThreadPtr&);
|
||||
|
||||
private:
|
||||
CThreadRep* m_rep;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user