From 779c61dd0dd19b3a9879bf5795ee451d48b74d0d Mon Sep 17 00:00:00 2001 From: Elle Mouton Date: Wed, 11 Dec 2024 17:45:04 +0200 Subject: [PATCH] protofsm: use pointer to GoroutineManager --- protofsm/state_machine.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protofsm/state_machine.go b/protofsm/state_machine.go index a300e49b10..49917bbe21 100644 --- a/protofsm/state_machine.go +++ b/protofsm/state_machine.go @@ -145,7 +145,7 @@ type StateMachine[Event any, Env Environment] struct { // query the internal state machine state. stateQuery chan stateQuery[Event, Env] - wg fn.GoroutineManager + wg *fn.GoroutineManager quit chan struct{} startOnce sync.Once @@ -206,7 +206,7 @@ func NewStateMachine[Event any, Env Environment]( ), events: make(chan Event, 1), stateQuery: make(chan stateQuery[Event, Env]), - wg: *fn.NewGoroutineManager(), + wg: fn.NewGoroutineManager(), newStateEvents: fn.NewEventDistributor[State[Event, Env]](), quit: make(chan struct{}), }