开发者

Starting a executable from multiple threads through Process.Start()

I am using "7z.exe" to do some extra work in my application(c#).I have embedded "7z.exe" in the main executable of my application as a resource file. During execution of my application i extract "7z.exe" on a hard-disk and execute it through Process.Start().

I need to execute "7z.exe" multiple times and from multiple threads. Is it safe to access same "7z.exe" file from multiple threads? or should i开发者_Go百科 extract separate "7z.exe" (to different location on hard-disk) for each process.Start()

PS:7z.exe belongs to Seven-zip software which is written in c/c++.


Yes, you should be able to start multiple processes from the same executable file - assuming the process doesn't do anything itself to prevent that (which is feasible - you'd have to check for 7-zip). Can you definitely not do what you want using a zip library such as SharpZipLib?


Yes, it's safe to execute same exe file from different processes/threads.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜