Tuesday, 15 July 2014

c# - is Process.Start() synchronous? -



c# - is Process.Start() synchronous? -

i have code this:

processstartinfo psi= new processstartinfo(...); process process = process.start(psi); application.current.shutdown();

even process have process info of application (i have logs) in rare cases on production computer process not opened @ all.

as process.start() synchronous , if returns value there must running process.

another info have genuine process shell process.

does have thought problem?

process io artifact, there delays, between start , opened.

this delay, naturally, depends on concrete machine, run code.

so, solution can

or sleep main thread untill p process opened, amount of time

or close main thread, when (say) timer able find required p process in list of run os processes.

the second, think, improve solution.

c# asynchronous process

No comments:

Post a Comment