mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Switches all notifiers created with the external API to be threaded (#546)
Testing showed this wasn't an issue with timing, and allows for more safety in user code making mistakes. Places where the extra thread wouldn't help have been kept non threaded, using a new internal API.
This commit is contained in:
committed by
Peter Johnson
parent
1d15fcd072
commit
c57a7f0a41
@@ -18,6 +18,7 @@
|
||||
#include "HAL/cpp/Log.h"
|
||||
#include "edu_wpi_first_wpilibj_hal_NotifierJNI.h"
|
||||
#include "support/SafeThread.h"
|
||||
#include "HAL/cpp/NotifierInternal.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
@@ -147,7 +148,8 @@ Java_edu_wpi_first_wpilibj_hal_NotifierJNI_initializeNotifier(
|
||||
notify->Start();
|
||||
notify->SetFunc(env, func, mid);
|
||||
int32_t status = 0;
|
||||
HAL_NotifierHandle notifierHandle = HAL_InitializeNotifier(notifierHandler, notify, &status);
|
||||
HAL_NotifierHandle notifierHandle =
|
||||
HAL_InitializeNotifierNonThreadedUnsafe(notifierHandler, notify, &status);
|
||||
|
||||
NOTIFIERJNI_LOG(logDEBUG) << "Notifier Handle = " << notifierHandle;
|
||||
NOTIFIERJNI_LOG(logDEBUG) << "Status = " << status;
|
||||
|
||||
Reference in New Issue
Block a user