2 ms·
Python is driving the program, and the threading library you're using provides its own abstractions on top of Pthreads itself. Pthreads has no concept of work p
by scott_s 15y ago
Python is driving the program, and the threading library you're using provides its own abstractions on top of Pthreads itself. Pthreads has no concept of work pools - although many people end up implementing them when using Pthreads. Pthreads is a relatively low-level library that specifies how to create and join threads, and then provides mutexes and condition variables to synchronize across them. The threading library you're using hides all of that from you (which is a good thing!).
Where the code spends most of its time isn't the important thing for classification. What's important is what decided the structure of your code? And that was the threading library as provided by Python, not Pthreads. In fact, the threading library you're using only incidentally uses Pthreads as their implementation mechanism, similar to how gcc's implementation of OpenMP only incidentally uses Pthreads.