44
55#include " LlamaDataTypes.h"
66#include " CoreMinimal.h"
7- // #include "LlamaNative.generated.h"
87
98
109/* *
@@ -45,10 +44,10 @@ class LLAMACORE_API FLlamaNative
4544 // if you've queued up a lot of BG tasks, you can clear the queue with this call
4645 void ClearPendingTasks (bool bClearGameThreadCallbacks = false );
4746
48- // tick forward for safely consuming game thread messages without hanging
47+ // tick forward for safely consuming game thread messages
4948 void OnGameThreadTick (float DeltaTime);
50- void AddTicker (); // optional if you don't forward ticks from e.g. component tick
51- void RemoveTicker (); // if you use AddTicker, use remove ticker to balance on exit. Will happen on destruction of native component .
49+ void AddTicker (); // optional call this once if you don't forward ticks from e.g. component/actor tick
50+ void RemoveTicker (); // if you use AddTicker, use remove ticker to balance on exit. Will happen on destruction of FLlamaNative if not called earlier .
5251 bool IsNativeTickerActive ();
5352
5453 // Context change - not yet implemented
@@ -68,11 +67,11 @@ class LLAMACORE_API FLlamaNative
6867 FLlamaNative ();
6968 ~FLlamaNative ();
7069
71- float ThreadIdleSleepDuration = 0 .005f ; // 5ms sleep timer for BG thread'
70+ float ThreadIdleSleepDuration = 0 .005f ; // default sleep timer for BG thread in sec.
7271
7372protected:
7473
75- // can be safely called on game thread or the bg thread, handles either logic
74+ // can be safely called on game thread or the bg thread
7675 void SyncModelStateToInternal (TFunction<void ()>AdditionalGTStateUpdates = nullptr);
7776
7877 // utility functions, only safe to call on bg thread
@@ -84,7 +83,7 @@ class LLAMACORE_API FLlamaNative
8483 FLLMModelParams ModelParams;
8584 FLLMModelState ModelState;
8685
87- // BG State
86+ // BG State - do not read/write on GT
8887 FString CombinedPieceText; // accumulates tokens into full string during per-token inference.
8988
9089 // Threading
0 commit comments