| 24 | // |
| 25 | |
| 26 | SocketMultiplexer::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 | |
| 43 | SocketMultiplexer::~SocketMultiplexer() |
| 44 | { |
nothing calls this directly
no outgoing calls
no test coverage detected