Open zxx8808 opened 2 years ago
When I config the cmake option UA_MULTITHREADING=100
, the program stops at an assertion ++(lock->mutexCounter) == 1
.
The call stack below shows the two places where the mutex is locked at. I don't know why UA_LOCK(&server->serviceMutex)
is already used in periodicServerRegister
, UA_LOCK
in __UA_Server_read
can still go on to assert
. Why isn't it stopped at pthread_mutex_lock(&lock->mutex)
?
The call stack is as follows, I think it's because I use a timer( created using
timer_create
) in my program, so the program interlocks at the following two red boxes.Instead of using a system timer, the approach I came up with is to get the current time and the last time. If their difference is greater than a certain value, then do the things I want to do. Maybe this timer is not very accurate.
Want to ask:
Used CMake options:
Checklist
Please provide the following information:
UA_LOGLEVEL
set as low as necessary) attached