MCPcopy Create free account
hub / github.com/Axosoft/nsfw / InotifyEventLoop

Method InotifyEventLoop

src/linux/InotifyEventLoop.cpp:3–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "../../includes/linux/InotifyEventLoop.h"
2
3InotifyEventLoop::InotifyEventLoop(
4 int inotifyInstance,
5 InotifyService *inotifyService
6) :
7 mInotifyInstance(inotifyInstance),
8 mInotifyService(inotifyService)
9{
10 mStarted = !pthread_create(
11 &mEventLoop,
12 NULL,
13 [](void *eventLoop)->void * {
14 ((InotifyEventLoop *)eventLoop)->work();
15 return NULL;
16 },
17 (void *)this
18 );
19 if (mStarted) { mLoopingSemaphore.wait(); }
20}
21
22bool InotifyEventLoop::isLooping() {
23 return mStarted;

Callers

nothing calls this directly

Calls 2

waitMethod · 0.80
workMethod · 0.45

Tested by

no test coverage detected