I have a console app that is doing some long sinking for an FTP server.
Another console app creates a local file system with some required updated files.
Then the second person will wait for the final directory name to end before swapping so that it will appear on the web.
I searched the best way to communicate the syncing app on the second app that has finished this task. It seems that the most suitable solution for this is
The question is two times:
- Am I right? Is there a further straight path to get the same results?
- Is there a managed (.net) way to do this?
If you only want to notify an application that the other completed its work , The nominated eventWaitHandle will be the easiest way to have the object built in its customized state. The first app waits on the handle, and the second app is handled when it finishes its work, for example:
// First App EventViewthandel WaitingFoursignal = New EventWidth Handle (Incorrect, Event Reset Mode Manual reset, "mywithandle"); // Here, the first application can be that it can start // so it is waiting for the handle to handle: // unless the handle does not handle, the program will block. WaitForSignal.WaitOne ();
This sets the first program to wait for synchronization. The second application is equally simple:
// The second app event is done with the handheld hints = new eventwidthhand (wrong, event reset.modial reset, "mywithandle"); // Here, the second app launches what he needs. // When this is done, it indicates wait handle: doneWithInit.Set ();
When another application call is set, this indicates the event and the first app will continue.
Comments
Post a Comment