On Sunday, 28 June 2015 at 16:32:24 UTC, Suliman wrote:
You can see an example in libasync.tests

thanks! I have got few questions
g_cbCheck = new shared bool[19];
what does it do?

AsyncDirectoryWatcher g_watcher = new AsyncDirectoryWatcher(getThreadEventLoop()); Am I right understand that it's run new eventloop inside AsyncDirectoryWatcher function?

The g_cbCheck is specific to this unit test, everytime a callback succeeds it will set its index to true in the array.

The event loop must be passed to the async object because the watcher will register itself to it when it is run.

When you've registered your callback in the watcher and run it through the event loop, you have to run the event loop and events will be pushed to your callback

Reply via email to