mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-06-02 20:36:23 +02:00
win32_service
This commit is contained in:
parent
6a7224d9f3
commit
7f57980c20
5 changed files with 86 additions and 98 deletions
9
Queue.h
9
Queue.h
|
@ -99,6 +99,13 @@ namespace util
|
|||
public:
|
||||
|
||||
MsgQueue (): m_Thread (std::bind (&MsgQueue<Msg>::Run, this)) , running(1) {};
|
||||
/*
|
||||
~MsgQueue()
|
||||
{
|
||||
WakeUp();
|
||||
Stop();
|
||||
}
|
||||
*/
|
||||
void Stop()
|
||||
{
|
||||
running = 0;
|
||||
|
@ -109,7 +116,7 @@ namespace util
|
|||
void Run ()
|
||||
{
|
||||
Msg * msg = nullptr;
|
||||
while ((msg = Queue<Msg>::GetNext ()) != nullptr && running)
|
||||
while (((msg = Queue<Msg>::GetNext ()) != nullptr) && running)
|
||||
{
|
||||
msg->Process ();
|
||||
delete msg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue