mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Adds a static mutex to notifiers to stop destructor race condition (#204)
This commit is contained in:
committed by
Peter Johnson
parent
776cb915bc
commit
40365faeda
@@ -106,8 +106,11 @@ void NotifierThreadJNI::Main() {
|
||||
jvm->DetachCurrentThread();
|
||||
}
|
||||
|
||||
void notifierHandler(uint64_t currentTimeInt, void *param) {
|
||||
((NotifierJNI *)param)->Notify(currentTimeInt);
|
||||
void notifierHandler(uint64_t currentTimeInt, HAL_NotifierHandle handle) {
|
||||
int32_t status = 0;
|
||||
auto param = HAL_GetNotifierParam(handle, &status);
|
||||
if (param == nullptr) return;
|
||||
(static_cast<NotifierJNI*>(param))->Notify(currentTimeInt);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
Reference in New Issue
Block a user