mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
refactor(tracker): get rid of execChan, use broker.ToModel instead
This commit is contained in:
parent
76322bb541
commit
37769fcc9c
@ -133,17 +133,17 @@ func init() {
|
||||
}
|
||||
},
|
||||
CloseFunc: func() {
|
||||
t.Exec() <- func() { t.ForceQuit().Do() }
|
||||
broker.ToModel <- tracker.MsgToModel{Data: func() { t.ForceQuit().Do() }}
|
||||
t.WaitQuitted()
|
||||
detector.Close()
|
||||
},
|
||||
GetChunkFunc: func(isPreset bool) []byte {
|
||||
retChn := make(chan []byte)
|
||||
t.Exec() <- func() { retChn <- t.MarshalRecovery() }
|
||||
broker.ToModel <- tracker.MsgToModel{Data: func() { retChn <- t.MarshalRecovery() }}
|
||||
return <-retChn
|
||||
},
|
||||
SetChunkFunc: func(data []byte, isPreset bool) {
|
||||
t.Exec() <- func() { t.UnmarshalRecovery(data) }
|
||||
broker.ToModel <- tracker.MsgToModel{Data: func() { t.UnmarshalRecovery(data) }}
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user