Hercoa

1

votes
2

answer
37

views

How can I pause resume of all thread?

My use case: A process -> request pause/resume(via IPC) -> B process My purpose is to save CPU usage of B process when B process is background. Because all threads of B process are consuming CPU usage. So that I want to pause/restart all threads of B process when I wanted. Q1) how can I pause/resum...
Hercoa
1

votes
2

answer
79

views

In c++, How can I share data between two classes efficiently?

#include 'dataConsumer.h' #include #include DataConsumer::DataConsumer(){} DataConsumer::~DataConsumer(){} void DataConsumer::Body() { std::cout
Hercoa
1

votes
1

answer
0

views

When building a shared library, are only the header files of dependent libraries needed?

Say a shared library A depends on another shared library B. In this case, when I build A, do I need only the header file of B? Because B is only needed when I build some program that needs A. Is it right? Could you explain the details?
Hercoa
0

votes
1

answer
18

views

(C++) Do I need to destroy singleton instance in my case?

If the process is terminated after I use singleton instance like below. Is there memory leak is exist? Q1) If yes, How can I fix the problem? Q2) Do I need to add 'destroyInstance' member function? Q3) If yes, when multi thread is already refer to the singleton instance, how can I assure multi threa...
Hercoa