Answer the question
In order to leave comments, you need to log in
Relationship between c++ application multithreading and system level multithreading?
The following question arose: in C ++ there are two options for working with multithreading - std::tear and using mutex. But, both of these options, as I understand it, implement multithreading in the application itself - that is, work with a shared object and access to it by several threads. The most banal example:
nt number = 6;
void method1()
{
mutex.lock();
number *= 5;
number /= 4;
mutex.unlock();
}
void method2()
{
mutex.lock();
number *= 3;
number /= 2;
mutex.unlock();
}
Answer the question
In order to leave comments, you need to log in
You have a total mess in your head regarding terms. Understand what is a process and what is a thread, what is the "second way to deal with multithreading using mutexes" and so on. "Multi-threading in one translation unit" is just a masterpiece. How are translation units related to streams?
From your stream of consciousness , I understand that you need QSingleApplication - A thing that prevents the program from running more than once.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question