Announcing libasync, a cross-platform D event loop

Etienne via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 29 14:36:00 PDT 2015


On Monday, 29 June 2015 at 20:34:11 UTC, Suliman wrote:
> 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.

Yes that line is required


More information about the Digitalmars-d mailing list