mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Java: call JNI AttachCurrentThread less frequently.
Each call to AttachCurrentThread results in a new Java thread object being created. This is inefficient and also causes debugging issues with Eclipse due to constant creation and removal of threads. Now AttachCurrentThread is only called once for (all) listeners and once for logging (if used).
This commit is contained in:
@@ -180,6 +180,9 @@ void Flush();
|
||||
* Callback Creation Functions
|
||||
*/
|
||||
|
||||
void SetListenerOnStart(std::function<void()> on_start);
|
||||
void SetListenerOnExit(std::function<void()> on_exit);
|
||||
|
||||
typedef std::function<void(unsigned int uid, StringRef name,
|
||||
std::shared_ptr<Value> value,
|
||||
unsigned int flags)> EntryListenerCallback;
|
||||
|
||||
Reference in New Issue
Block a user