Add wasmtime to CI. (#212)

This commit is contained in:
Nuno Cruces
2025-01-07 16:31:12 +00:00
committed by GitHub
parent 31c5000875
commit 0c09dd89c2
18 changed files with 55 additions and 63 deletions

10
conn.go
View File

@@ -6,6 +6,7 @@ import (
"math"
"math/rand"
"net/url"
"runtime"
"strings"
"time"
@@ -375,8 +376,13 @@ func (c *Conn) checkInterrupt(handle uint32) {
}
func progressCallback(ctx context.Context, mod api.Module, _ uint32) (interrupt uint32) {
if c, ok := ctx.Value(connKey{}).(*Conn); ok && c.interrupt.Err() != nil {
interrupt = 1
if c, ok := ctx.Value(connKey{}).(*Conn); ok {
if c.interrupt.Done() != nil {
runtime.Gosched()
}
if c.interrupt.Err() != nil {
interrupt = 1
}
}
return interrupt
}