Asynchronous Process.WaitForExit()?
- From: "Douglas Harber" <--remove-this--dh-nospam@xxxxxxxxx>
- Date: Wed, 14 Jun 2006 15:38:47 -0700
Is there any way to do an asynchronous wait for a process to exit? My
application needs to monitor when processes it launched have completed and
take further action. However, the app can launch processes essentially
randomly (with respect to any other launched processes and/or their
completion). The current implementation has to create a thread per process
simply to wait for that process to exit and fire an event back into the main
thread. It would be a whole lot simpler if there was a BeginWaitForExit()
method on Process to allow my app to be notified asynchronously as each
process terminated.
Is there any way to emulate that kind of functionality? So far, I'm missing
it.
In fact, it's not clear to me that you can asynchronously wait on any
signalable Win32 object in the elegant generalized fashion of Win32.
Am I overlooking some functionality that's available in .NET?
BTW, it's fine if it'a .NET 2.0 only thing.
Thanks,
Doug Harber
.
- Follow-Ups:
- Re: Asynchronous Process.WaitForExit()?
- From: William Stacey [MVP]
- Re: Asynchronous Process.WaitForExit()?
- From: Carl Daniel [VC++ MVP]
- Re: Asynchronous Process.WaitForExit()?
- Prev by Date: Re: Toolbar Scrolls with Window
- Next by Date: .NET Frameowrk's interaction with the Windows OS
- Previous by thread: Could not load type
- Next by thread: Re: Asynchronous Process.WaitForExit()?
- Index(es):
Relevant Pages
|