Skip to content

qedsoftware/python-parallelism-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

THREADS VS. PROCESSES IN PYTHON

This small example compares multithreading and multiprocessing.

To test multi-threading, which works better for I/O-bound applications due to the Global Interpreter Lock:

$ time python test-thread.py

To test multi-processing, which works better for CPU-bound applications:

$ time python test-multiproc.py

Source: http://www.martinkral.sk/blog/2011/03/python-multicore-vs-threading-example/

About

Experiments with threads vs. processes in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages