Repository navigation
Releases: i2y/pyffi
Releases · i2y/pyffi
Release list
v0.6.0
New Features
CallContext/CallKwContexton*Objectand*BoundModule— context-aware variants ofCall/CallKwthat respectcontext.Contextcancellation and deadlines. If the context is cancelled before the Python call completes, the Go caller returnsctx.Err()immediately while the background goroutine cleans up automatically.
Example
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
result, err := fn.CallContext(ctx, arg1, arg2)
if errors.Is(err, context.DeadlineExceeded) {
// Python call took too long
}Internal
- Extracted
Runtime.callKwinternal helper to share logic betweenCallKwandCallKwContext.