P
P
prochanev2020-02-29 20:02:47
Python
prochanev, 2020-02-29 20:02:47

What happens if multiprocess is called from multiprocess?

Hello! I hope for the help of experienced developers.

For example, I'm making a library my_libraryin which I use a module multiprocessingto implement a method call_in_multiprocessthat does some kind of calculation.

What happens if a library user my_librarycalls a method my_library. call_in_multiprocessin another process, thinking, well, I'll now parallelize this through the process.

Should I explicitly state that a particular method internally runs in multiple processes. And should the user of the library somehow take this fact into account when writing their code.

A similar question is about threads, for example, with a method, my_library. call_in_multithreads.

How do you write code in such situations?
I really want to figure out what's what.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-02-29
@dimonchik2013

they write asynchronously
, and so - as the bow is nailed, it will hold on, more than iron can not be multiplied

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question