Displaying 17 results from an estimated 17 matches for "goroutines".
Did you mean:
coroutines
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 an...
2011 Aug 15
4
[LLVMdev] Segmented Stacks: Pre-midterm work
Hi!
I've been working on coroutines for some time, 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
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 th...
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)
2017 May 17
0
Re: Callback re-registration after libvirtd restart
On Wed, May 17, 2017 at 03:08:23PM +0200, Daniel Kučera wrote:
> 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
2011 Aug 16
0
[LLVMdev] Segmented Stacks: Pre-midterm work
Hi Sanjoy,
> I've been working on coroutines for some time, 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
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
Hi Daniel,
I tried that but it doesn't work:
func libvirt_close_callback(conn *libvirt.Connect, reason
libvirt.ConnectCloseReason){
log.Printf("close callback: %+v", reason)
}
func event_listen() {
log.Printf("event_listen %s", conf.Libvirt.LocalUrl)
hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl)
err =
2020 Apr 10
3
[PATCH nbdkit UNFINISHED] Add the ability to write plugins in golang.
Sorry Dan, but I really do dislike golang with a passion :-)
Here is a patch that allows you to write nbdkit plugins in golang. As
with C, OCaml and Rust, you can write a plugin in Go which compiles
directly to a .so file that can be loaded into golang, so in that
sense it works completely differently from scripting language plugins
like Perl and Python where there's an
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.