work on threads
continuous-integration/drone/push Build encountered an error Details

opengl
yorick 3 years ago
parent 34b8730706
commit 1904924f3d

@ -73,7 +73,7 @@ void cameraManager::runCapture(){
std::thread* t = new std::thread(cameraManager::runCaptureForCamera,c,i);
i++;
cout << "moving thread" << endl;
Threadweaver::stick_this_thread_to_core(t,i);
Threadweaver::stick_this_thread_to_core(t,i+1);
Threadweaver::captureThreads.push_back(t);
cout << "done" << endl;
}

@ -44,14 +44,17 @@ void SerialPortManager::init(){
printf("Error %i from tcsetattr: %s\n", errno, strerror(errno));
return;
}
shouldRun = true;
shouldRun = false;
cout << "starting hardware watcher thread" << endl;
std::thread* t = new std::thread(SerialPortManager::runPort);
cout << "done" << endl;
Threadweaver::stick_this_thread_to_core(t,3);
Threadweaver::hardwareWatcherThread = t;
shouldRun = true;
}
void SerialPortManager::runPort(){
while(!shouldRun){}
char read_buf [256];
int n = 0;
while(shouldRun){

@ -23,7 +23,7 @@ ui::UiController::exitCalled = false;
ui::UiController::runIntro = false;
std::thread* t = new std::thread(ui::UiDrawer::runDrawUi);
Threadweaver::stick_this_thread_to_core(t,0);
Threadweaver::stick_this_thread_to_core(t,1);
Threadweaver::osUiDrawerThread = t;
while(!ui::UiController::exitCalled){

Binary file not shown.
Loading…
Cancel
Save