Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)

I'm literally giving my best to understand multiprocessing and threading in python. I need to know what are all the advantages are there?

1 Answer

0 votes
by (26.4k points)

The threading module utilizes strings, the multiprocessing module utilizes processes. The thing that matters is that strings run in a similar memory space, whereas processes have separate memory. This makes it cycle harder to impart objects between processes to multiprocessing. Since threads utilize a similar memory, precautions must be taken or two threads will keep in touch with a similar memory simultaneously. This is the thing that the global interpreter lock is for. 

Spawning processes is a piece slower than spawning threads.

Want to know more information about python? Join python certification course!

For more details, do check out...

Related questions

0 votes
1 answer
0 votes
1 answer
asked Sep 26, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
asked Jun 27, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
0 votes
4 answers

Browse Categories

...