Tmds.ExecFunction | Execute a function in a separate process | BPM library
kandi X-RAY | Tmds.ExecFunction Summary
kandi X-RAY | Tmds.ExecFunction Summary
Tmds.ExecFunction is a library that makes it simple to execute a function in a separate process. This can be interesting for writing tests that require a separate process, or running some code with a different lifetime as the .NET application process. The library is based on the corefx RemoteExecutorTestBase class.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Tmds.ExecFunction
Tmds.ExecFunction Key Features
Tmds.ExecFunction Examples and Code Snippets
ExecFunction.Run(() => Console.WriteLine("Hello from child process!"));
ExecFunction.Run(..., o => o.StartInfo.RedirectStandardOutput = true);
private FunctionExecutor FunctionExecutor = new FunctionExecutor(o.StartInfo.RedirectStandardOutput
Community Discussions
Trending Discussions on Tmds.ExecFunction
QUESTION
For reasons of memory isolation and stability I need to execute some methods/classes as sub-processes, not threads. I found the following library that allows me to do just that: https://github.com/tmds/Tmds.ExecFunction.
However, I can't seem to find a way to get the process ID of the child process.
...ANSWER
Answered 2021-Jan-20 at 17:08If you examine the source code for Tmds.ExecFunction
, both methods .Run(...)
(here) and .Start(...)
(here) under the hood call the same private method .Start(...)
(source here). The two differences are:
- the public
.Start(...)
method returns theprocess
object from the tuple returned by the private.Start(...)
method whereas.Run(...)
does not; - the
.Run(...)
method also supplieswaitForExit: true
in the parameters.
In the code of the private .Start(...)
method, there is this portion:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Tmds.ExecFunction
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page