A collection of sloppy snippets for scientific computing and data visualization in Python.
Showing posts with label
multithreading
.
Show all posts
Showing posts with label
multithreading
.
Show all posts
Tuesday, May 3, 2011
How to synchronize threads using locks
›
In this post we will extend a previous example about multithreading . Here's how to synchronize two threads using a simple lock: impor...
Friday, April 22, 2011
How to implement a multithread echo server
›
The example implement a multithread echo server. Every incoming request is handed off to a worker thread that will process the request. imp...
Wednesday, April 20, 2011
How to create threads
›
The example show how to define the behavior of a thread and run it. import threading import time import random class MyThread(threading.Th...
›
Home
View web version