This commit is contained in:
eson 2023-11-13 21:40:54 +08:00
parent 97970a5fb0
commit b747cc64f4

View File

@ -2,12 +2,15 @@ package fusenrender
import ( import (
"context" "context"
"log"
"github.com/474420502/execute/triggered" "github.com/474420502/execute/triggered"
"github.com/474420502/passer" "github.com/474420502/passer"
sm "github.com/lni/dragonboat/v4/statemachine" sm "github.com/lni/dragonboat/v4/statemachine"
) )
var putCount int = 0
// 结构体异步传递后, 执行的注册函数, 实际上就是update的handler // 结构体异步传递后, 执行的注册函数, 实际上就是update的handler
var FsPasser *passer.Passer[sm.Result] = func() *passer.Passer[sm.Result] { var FsPasser *passer.Passer[sm.Result] = func() *passer.Passer[sm.Result] {
@ -35,6 +38,9 @@ var FsPasser *passer.Passer[sm.Result] = func() *passer.Passer[sm.Result] {
Value: cmd.Item, Value: cmd.Item,
}) })
putCount++
log.Println("put", putCount)
var result sm.Result var result sm.Result
dequeueHandler.Notify(dequeueHandler.NULL) // 通知可以执行update dequeueHandler.Notify(dequeueHandler.NULL) // 通知可以执行update
return result, nil return result, nil