title: How make a threading mechanism in C++?
body: <p>I know there are some threading libraries for C++, like Pthread, Boost etc out there, but how are they working? There must be an implementation of the logic somewhere.</p>
  
  <p>Let's say that I would like to write my own threading mechanism in C++, not using any library, how would I start? What should I have in mind when writing it?</p>