Python

Maintaining state while threading in Python

If you have ever worked with threading in Python before, you may have encountered issues where everything gets a little bit out of step (if you’re incrementing a counter, 2 threads may simultaneously try to increment it & mess up your program). So we can deal with that using queues. Let’s walk through an example […]

Read more
Python

A crash course in threading and multiprocessing in python

When you first start looking into asynchronous processing in Python, you’ll come across a couple of terms: threading and multiprocessing. The first part of this article then, is about understanding what those two terms mean and when you should use one over the other. What is threading? Threading is a way to overcome performance issues […]

Read more
Python

The basics of threading in Python

If you’re a frequent reader of my website, you’ll know that I’ve been doing a lot with Golang recently.. like, a lot and it got me thinking about how easy concurrency is in Golang and how it just isn’t the same in Python. Below, we have an example of a simple for loop being threaded […]

Read more