Skip to content
Discussion options

You must be logged in to vote

If these are single-shot computations, you could fork the main process after receiving the data and do the computations in the child processes. (Just spawning threads is not sufficient as Python will use process-wide data structures and locks like the GIL, so the work would done by thread_fn1 and thread_fn2 would run serially.)

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@sun-rs
Comment options

@adamreichold
Comment options

Answer selected by sun-rs
Comment options

You must be logged in to vote
2 replies
@adamreichold
Comment options

@mejrs
Comment options

mejrs Jan 13, 2023
Collaborator

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