Best Direction on Spawning Process Async

Mike McKee via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 15 21:21:45 PDT 2015


What's the best direction from...

http://dlang.org/phobos/std_process.html

...on spawning an async process and then peeking at it 
occasionally as it runs, and then get notified when it finishes? 
In other words, what std.process functions would you recommend I 
use? What I want to avoid is a blocking state where the GUI 
freezes because it's waiting for the process to complete.

For instance, imagine you are building a front end GUI (like 
GtkD) to a command-line based antivirus scanner. You'll want to 
spawn the process, show a progress bar, and as the command line 
returns status information, you peek at it asynchronously and 
then update the progress bar (or perhaps store virus detected 
info in a table), and then stop the progress bar at 100% when the 
command process has finished.



More information about the Digitalmars-d-learn mailing list