Announcing libasync, a cross-platform D event loop

Etienne via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 28 09:57:51 PDT 2015


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


More information about the Digitalmars-d mailing list