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

Extracting output from several threads #45

Open
tlienart opened this issue May 10, 2022 · 1 comment
Open

Extracting output from several threads #45

tlienart opened this issue May 10, 2022 · 1 comment

Comments

@tlienart
Copy link

tlienart commented May 10, 2022

Hello,

I'd like to do something like the following:

Threads.@threads for k in 1:Threads.nthreads()
    captured[k] = (...) begin
        include_string(mdl[k], code[k])
    end
end

i.e. each thread executes some code code[k] in a module mdl[k], the output (stdout + stderr) is captured per thread and saved in captured[k].
Is this possible with Suppressor? I'm aware I can use locks around the capture but then this would be the same as running the code sequentially afaik.

Thanks

@cjproud
Copy link

cjproud commented Oct 28, 2022

Any update on this? I'm running a process separately on multiple threads of which I want to capture the output of each.

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

No branches or pull requests

2 participants