iter: Pull doesn't work with Cgo callbacks #65946
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.22.0 darwin/arm64 and go version devel go1.23-fc0d9a4b7d Mon Feb 26 22:45:28 2024 +0000 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
While experimenting with
iter.Pull
to see whether pull iterators may obviate the need for #64777 (and #64755), I created a program with the filesand
What did you see happen?
If I comment out the
runtime.LockOSThread
I get a different error:I haven't tested the equivalent to Windows'
syscall.NewCallback
that behaves similar to Cgo callbacks.What did you expect to see?
Replacing
pullIterate
withforIterate
makes the program run as expected:This may very well be a duplicate of #65889.
The text was updated successfully, but these errors were encountered: