Announcing libasync, a cross-platform D event loop
Suliman via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 29 13:34:08 PDT 2015
Ehm, there is issue on Windows or I am again doing something
wrong?
void main()
{
void dirWatcher()
{
auto g_watcher = new
AsyncDirectoryWatcher(getThreadEventLoop());
g_watcher.run({
DWChangeInfo[1] change;
DWChangeInfo[] changeRef = change.ptr[0..1];
while(g_watcher.readChanges(changeRef)){
writeln(change);
}
});
g_watcher.watchDir(".");
getThreadEventLoop().loop();
}
dirWatcher();
destroyAsyncThreads();
}
Without destroyAsyncThreads(); it's fail with exception.
More information about the Digitalmars-d
mailing list