Announcing libasync, a cross-platform D event loop
Suliman via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 28 12:34:44 PDT 2015
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();
}
dirWatcher();
//destroyAsyncThreads();
}
Is this code enough to monitoring folder?
If I run it it's terminating, it's seems that eventloop not
starting or I placed it in wrong place?
More information about the Digitalmars-d
mailing list