There is no multi-threading in C++ multi-threading is a platform feature outside the C++ standard.
That said it is normally fairly simple, write a function that will be the entry point of your thread, call a function to create the new thread.
You have to be careful in Windows that has several different functions you can call all of which do slightly different things.
You must also be careful about data access, if a thread is writing to a variable then you must ensure no other thread is reading or writing to the same variable.
Thread synchronisation objects like mutexs and semaphores which generally exist on most platforms that have multi-threading. Some platforms have additional synchronisation objects such as events and critical sections on Windows.
Whether you find it easy or difficult will depend on what you will be specifically doing with the threads, particularly the amount of interdependence of the threads. If there is no interaction between threads, it is typically pretty easy.
If you start getting into Producer/Consumer scenarios, then the threading becomes a little more complicated. Starting with the most basic of basic multi-threading will help you in the long run.
Comment