FAQ
I am working on a FUSE project where I need to use libfuse [hard
requirement]. I'm hoping to use Go but I can't figure out if libfuse
callbacks are safe within go: there will be a bunch of C threads calling
into go. From what I can tell this definitely used to be unsafe
[https://groups.google.com/forum/#!searchin/golang-nuts/callback/golang-nuts/H9QbEVrzccc/K8UISdXIB88J]
but since late 2012 it appears to possibly be supported. Issue 4435 seems
like it might've been the relevant fix
[https://code.google.com/p/go/issues/detail?id=4435].

I've ported the hello world example to go
  [http://fuse.sourceforge.net/helloworld.html] with cgo using the gateway
functions required. Definitely seems to work. But I don't have a clear
sense of whether or not I'm likely to destroy the heap or what happens when
more highly concurrent calls come in. Is it working because it's read-only?
Is it actually safe to do this? This thread and the resolution to 4435
suggest that having non-go threads call in [if done correctly] is okay.

[https://groups.google.com/forum/#!searchin/golang-nuts/callback/golang-nuts/Pc1Nqpkqs8k/KZQP22Auqv0J


Can anyone provide a bit of updated guidance?

Thanks
Jeff




--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Ian Lance Taylor at Sep 9, 2014 at 4:46 pm

    On Tue, Sep 9, 2014 at 5:47 AM, wrote:
    I am working on a FUSE project where I need to use libfuse [hard
    requirement]. I'm hoping to use Go but I can't figure out if libfuse
    callbacks are safe within go: there will be a bunch of C threads calling
    into go. From what I can tell this definitely used to be unsafe
    [https://groups.google.com/forum/#!searchin/golang-nuts/callback/golang-nuts/H9QbEVrzccc/K8UISdXIB88J]
    but since late 2012 it appears to possibly be supported. Issue 4435 seems
    like it might've been the relevant fix
    [https://code.google.com/p/go/issues/detail?id=4435].

    I've ported the hello world example to go
    [http://fuse.sourceforge.net/helloworld.html] with cgo using the gateway
    functions required. Definitely seems to work. But I don't have a clear sense
    of whether or not I'm likely to destroy the heap or what happens when more
    highly concurrent calls come in. Is it working because it's read-only? Is it
    actually safe to do this? This thread and the resolution to 4435 suggest
    that having non-go threads call in [if done correctly] is okay.

    [https://groups.google.com/forum/#!searchin/golang-nuts/callback/golang-nuts/Pc1Nqpkqs8k/KZQP22Auqv0J


    Can anyone provide a bit of updated guidance?

    As of Go 1.1 it is fine for arbitrary C threads to call back into Go.

    Ian

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Aram Hăvărneanu at Sep 9, 2014 at 4:55 pm
    Note that there are several pure Go FUSE implementations.

    --
    Aram Hăvărneanu

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 9, '14 at 4:28p
activeSep 9, '14 at 4:55p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase