[Libguestfs] [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).

Daniel P. Berrangé berrange at redhat.com
Wed Mar 25 09:48:02 UTC 2020


On Wed, Mar 25, 2020 at 09:42:19AM +0000, Richard W.M. Jones wrote:
> Now runs a complete set of tests, notably including the AIO test.
> 
> File descriptors are passed in and out as plain ints (instead of
> *os.File) for a couple of reasons: (1) We have to pass the plain int
> to syscall.Select.  (2) Turning an fd into an os.File causes golang to
> set the blocking flag which is deeply unhelpful.

FWIW, using non-blocking FDs and syscall.Select is not normal best
practice for Go, where the expected model would be to use goroutines
with the file in blocking mode.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libguestfs mailing list