Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add run_async() function. #3

Open
feluxe opened this issue Oct 12, 2017 · 0 comments
Open

add run_async() function. #3

feluxe opened this issue Oct 12, 2017 · 0 comments

Comments

@feluxe
Copy link
Owner

feluxe commented Oct 12, 2017

Add run_async() function.

This one has the same functionality as run(), only that it does not wait for the subprocess to finish.

p = run_async(*args)

# do stuff

result: ProcResult = p.block()

print(result.return_code)

In case verbose is True you have to run the stdout stream in a thread, so that the run_async() won't block, while reading the subprocess output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant