Switched away from boost::asio as it doesn't play well with libpq
This commit is contained in:
parent
6dd079bf87
commit
6bb5525d5e
13 changed files with 566 additions and 143 deletions
31
pglablib/WaitHandleList.cpp
Normal file
31
pglablib/WaitHandleList.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include "WaitHandleList.h"
|
||||
#include "win32event.h"
|
||||
|
||||
WaitHandleList::WaitHandleList() = default;
|
||||
WaitHandleList::~WaitHandleList() = default;
|
||||
|
||||
WaitResultValue WaitHandleList::add(HANDLE h)
|
||||
{
|
||||
m_waitHandles.push_back(h);
|
||||
return WAIT_OBJECT_0 + static_cast<DWORD>(m_waitHandles.size() - 1);
|
||||
}
|
||||
|
||||
WaitResultValue WaitHandleList::add(Win32Event &e)
|
||||
{
|
||||
return add(e.handle());
|
||||
}
|
||||
|
||||
DWORD WaitHandleList::count() const
|
||||
{
|
||||
return static_cast<DWORD>(m_waitHandles.size());
|
||||
}
|
||||
|
||||
void WaitHandleList::clear()
|
||||
{
|
||||
m_waitHandles.clear();
|
||||
}
|
||||
|
||||
WaitHandleList::operator const HANDLE*() const
|
||||
{
|
||||
return m_waitHandles.data();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue