[Libguestfs] [PATCH libnbd] examples: Fix theoretical cookie race in example.

Richard W.M. Jones
Tue, 30 Jul 2019 10:51:40 -0000

Previously discussed here:
https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html

It turns out that deferring callbacks is a PITA.  (It would be a bit
easier if C has closures.)  However by rewriting the example we can
avoid the need to use the cookie at all and make it run a bit more
efficiently, so let's do that instead.

Rich.