Thread Pool in C

Introduction When I was writing Poddown I needed a thread pool and I needed one that is cross platform. Since it’s a lightweight app I didn’t want to include a big third party threading library. So I wrote my own. Why a Thread Pool Creating threads can be quite expensive. Typically each thread is going to do essentially the same thing so it’s good to keep reusing them. Threads are actually quite heavy and creating or destroying threads takes time away from what you’re trying to accomplish....

April 12, 2019 · John

Cross Platform Thread Wrapper

Introduction There are many open source applications which use threading and are limited to either *nix or Windows because Windows handles threading a bit differently than *nix. I develop on macOS so pthreads is my go to but using it effectively locks me out of Windows because Windows doesn’t implement pthread. Instead it has it’s own thread API. There is a pthread implementation that works on Windows but it’s big, and heavy....

April 5, 2019 · John

Effective Threading Using Qt

Effective Threading Using Qt Introduction Over the years using Qt I’ve seen a lot of difficulty using threads with Qt. Threads can be difficult and Qt provides a lot of ways to make threads easy to work with. Still basic / direct / low level threading (I’ll just call this basic) is often seen as difficult with Qt. It really isn’t though. There are three main ways I’ve seen people handle basic threading in their Qt applications....

May 2, 2015 · John