mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 14:57:13 +02:00
Printing thread Ids created and exited, others (if others) are zmqs internal threading, moved all zmq socket type to publish subscriber type: (non blocking in send if no client) as per Aldos gui and probably faster, as only clients to receiver standard impl is aldos gui/slsDetectorGui/xiaoqiangs call back via detector class
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#include "ThreadObject.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <syscall.h>
|
||||
using namespace std;
|
||||
|
||||
|
||||
@ -74,6 +75,7 @@ void* ThreadObject::StartThread(void* thisPointer) {
|
||||
|
||||
|
||||
void ThreadObject::RunningThread() {
|
||||
bprintf(BLUE,"Created [ %s Thread %d, Tid: %ld ]\n", GetType().c_str(),index, (long)syscall(SYS_gettid));
|
||||
while(true) {
|
||||
|
||||
while(IsRunning()) {
|
||||
@ -87,7 +89,7 @@ void ThreadObject::RunningThread() {
|
||||
sem_wait(&semaphore);
|
||||
|
||||
if(killThread) {
|
||||
bprintf(BLUE,"%s Thread %d: Goodbye\n",GetType().c_str(),index);
|
||||
bprintf(BLUE,"Exiting [ %s Thread %d, Tid: %ld ]\n", GetType().c_str(),index, (long)syscall(SYS_gettid));
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user