Displaying 17 results from an estimated 17 matches for "goroutine".
Did you mean:
coroutine
2014 Jul 15
2
Re: working with mount-local
...understand the question, but the guestfish mount-local-run
> command will block guestfish until another process runs
> 'fusermount -u /mntpoint' (or better, 'guestunmount /mntpoint').
I understand that guestfish process will be locked. But in case of go
that uses lightweight goroutines, is that possible to replace fork
with goroutine ?
--
Vasiliy Tolstov,
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru
2020 Mar 25
2
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
...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.
Right, however I couldn't find any documentation about how to
integrate a C library with that mechanism. Does libvirt-go do
anything like this?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming a...
2011 Aug 15
4
[LLVMdev] Segmented Stacks: Pre-midterm work
..., and it seems you were
right - it makes much more sense to have regular C (and assembly) code
for handling coroutines. For instance, I'd otherwise would have to
make an assumption about the threading model the platform has (or
assume there are no threads at all, which prevents me from allowing
goroutine like ("run parallel till you need to write to a channel")
behavior).
Right now I'm sort-of dogfooding my work by trying to get Go running
on dragonegg. I've discovered some small issues already (for instance
I need to save R10 somewhere when compiling a function with a nest
param...
2014 Jul 15
3
working with mount-local
Hi. I'm try to use guestfish inside golang (extract some files from
image and create squashfs from root).
Now i can't understand how can i work with mount-local/mount-local-run.
Where i can specify what partition i'm export to local? Does i need
firstly mount /dev/sda1 to / for example and after that run
mount-local /tmp/xxx ?
Second - i'm work with guestfish via writing to stdin
2020 Mar 25
1
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
...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.
> >
> > Right, however I couldn't find any documentation about how to
> > integrate a C library with that mechanism. Does libvirt-go do
> > anything like this?
>
> What's the intended usage of the FD ? I was t...
2017 May 17
2
Callback re-registration after libvirtd restart
Hi all,
I'm using libvirt-go and I following code to listen for lifecycle events:
func event_listen() {
log.Printf("event_listen %s", conf.Libvirt.LocalUrl)
hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl)
lifecycleCallback := func(c *libvirt.Connect, d *libvirt.Domain, event
*libvirt.DomainEventLifecycle) {
event_message(c, d, "lifecycle", event)
2011 Aug 15
0
[LLVMdev] Segmented Stacks: Pre-midterm work
On 08/10/2011 11:03 AM, Sanjoy Das wrote:
> Hi!
>
> Attached my pre-midterm GSoC work for segmented stacks for review (with
> the required fixes).
Nice work!
+ extern bool EnableSegmentedStacks;
Can you add a comment like the other declarations?
I think the patch looks good. There are possible improvements, but the
patch is already in an state where it can be tested and extended
2020 Mar 25
0
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
...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 :|
2020 Mar 25
0
Re: [PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
...gt; > 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.
>
> Right, however I couldn't find any documentation about how to
> integrate a C library with that mechanism. Does libvirt-go do
> anything like this?
What's the intended usage of the FD ? I was thinking it was just for
doing plain...
2020 Apr 29
0
golang: panic: runtime error: cgo argument has Go pointer to Go pointer
Hello,
when i use libguestfs to ceph rbd by golang, but there has panic:
panic: runtime error: cgo argument has Go pointer to Go pointer
goroutine 1 [running]:
guestfs.(*Guestfs).Add_drive.func11(0xc000010028, 0xcda6a0, 0xc0000d6000, 0xc000090280)
/opt/gopath/src/guestfs/guestfs.go:1440 +0xc2
guestfs.(*Guestfs).Add_drive(0xc000010028, 0x7ffd4b5d67ff, 0xd, 0xc00008d9d8, 0x0)
/opt/gopath/src/guestfs/guestfs.go:1440 +0x1b2
main.OpenImage(0x7ffd4...
2017 May 17
0
Re: Callback re-registration after libvirtd restart
...ate event you can listen to that notifies when the connection
is closed. See the RegisterCloseCallback() method on the Connect object.
Basically register a callback there, and when it fires, unregister your
existing domain event callbacks, and close your existing Connect object
handle. Then fire a goroutine that loops once every few seconds trying
to open a new Connect object, and when that succeeds register new
domain event callbacks.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berra...
2011 Aug 16
0
[LLVMdev] Segmented Stacks: Pre-midterm work
...gt; right - it makes much more sense to have regular C (and assembly) code
> for handling coroutines. For instance, I'd otherwise would have to
> make an assumption about the threading model the platform has (or
> assume there are no threads at all, which prevents me from allowing
> goroutine like ("run parallel till you need to write to a channel")
> behavior).
>
> Right now I'm sort-of dogfooding my work by trying to get Go running
> on dragonegg. I've discovered some small issues already (for instance
> I need to save R10 somewhere when compiling a fu...
2020 Feb 19
1
[PATCH] golang: make API idiomatic so that functions return (<val>, error)
Go API functions returned (<val>, *GuestfsError) that made
code like this fail to build:
n, err := os.Stdin.Read(buf)
if err != nil {
log.Fatal(err)
}
n, err = g.Pwrite_device(dev, buf[:n], off)
...
As err should be of error (interface) type as of the stdlib call,
and should be of *GuestfsError type as of the libguestfs call.
The concrete error value that
2011 Aug 10
2
[LLVMdev] Segmented Stacks: Pre-midterm work
Hi!
Attached my pre-midterm GSoC work for segmented stacks for review (with
the required fixes).
Thanks!
--
Sanjoy Das
http://playingwithpointers.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-New-command-line-option-to-enable-segmented-stacks.patch
Type: text/x-diff
Size: 1699 bytes
Desc: not available
URL:
2017 May 17
2
Re: Callback re-registration after libvirtd restart
...hat notifies when the
> connection
> is closed. See the RegisterCloseCallback() method on the Connect object.
>
> Basically register a callback there, and when it fires, unregister your
> existing domain event callbacks, and close your existing Connect object
> handle. Then fire a goroutine that loops once every few seconds trying
> to open a new Connect object, and when that succeeds register new
> domain event callbacks.
>
> Regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/
> dberrange :|
> |: https://libvirt.org...
2020 Apr 10
3
[PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.
...er I don't believe this is possible
because this function has to call into the plugin (in main module).
- Tests are a joke at the moment. We would really need a test which
properly exercises threads / parallel client connections, so we can
be sure that the nbdkit thread & golang goroutine models do not
conflict in some way. (I don't think they do, but need to check).
- Current test func pluginPRead() needs to be completed.
- Documentation needs fixing. I didn't want to write too many docs
until I know finally how plugins would work.
Rich.
[1] Reading the propos...
2020 Mar 25
3
[PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
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.
Rich.