Python threads

Jesse Noller has an excellent post on Python Threads and the Global Interpreter Lock that is well worth a read.

I, in particular, liked the use of decorators to get the “synchronized” feature known from Java and the long discussion about the GIL.

I haven’t used threads much in my own Python code — I usually split my scripts in separate processes to parallelise them on our cluster — so there were a lot in this post I didn’t know about.

33-53=-20

Author: Thomas Mailund

My name is Thomas Mailund and I am a research associate professor at the Bioinformatics Research Center, Uni Aarhus. Before this I did a postdoc at the Dept of Statistics, Uni Oxford, and got my PhD from the Dept of Computer Science, Uni Aarhus.

Leave a Reply