MCPcopy Create free account
hub / github.com/deskflow/deskflow / SocketMultiplexer

Method SocketMultiplexer

src/lib/net/SocketMultiplexer.cpp:26–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24//
25
26SocketMultiplexer::SocketMultiplexer()
27 : m_mutex(new Mutex),
28 m_jobsReady(new CondVar<bool>(m_mutex, false)),
29 m_jobListLock(new CondVar<bool>(m_mutex, false)),
30 m_jobListLockLocked(new CondVar<bool>(m_mutex, false))
31{
32 // this pointer just has to be unique and not nullptr. it will
33 // never be dereferenced. it's used to identify cursor nodes
34 // in the jobs list.
35 // TODO: Remove this evilness
36 m_cursorMark = reinterpret_cast<ISocketMultiplexerJob *>(this);
37
38 // start thread
39 auto tMethodJob = new TMethodJob<SocketMultiplexer>(this, &SocketMultiplexer::serviceThread);
40 m_thread = new Thread(tMethodJob);
41}
42
43SocketMultiplexer::~SocketMultiplexer()
44{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected