cbind.BindF

This commit is contained in:
Li Jie
2024-09-05 10:23:31 +08:00
parent 276f2070ee
commit 6e0a9b2b48
2 changed files with 41 additions and 13 deletions

View File

@@ -29,7 +29,7 @@ import (
func Timeout(d time.Duration) async.IO[async.Void] {
return async.Async(func(resolve func(async.Void)) {
t, _ := cbind.Bind[libuv.Timer](func() {
t, _ := cbind.BindF[libuv.Timer, libuv.TimerCb](func() {
resolve(async.Void{})
})
r := libuv.InitTimer(async.Exec().L, t)