Ruby/DL loaded shared libraries are blocking?

Discussion in 'Ruby' started by PierreW, Sep 23, 2010.

  1. PierreW

    PierreW Guest

    Hi guys,

    I am using Ruby/DL (dl/import) to load a dynamic library. It seems
    that when I call a function of this library from Ruby, it is blocking.
    Is it "normal", or am I doing something wrong? Is it possible to make
    it non-blocking?

    Thanks!
    Pierre
    PierreW, Sep 23, 2010
    #1
    1. Advertising

  2. PierreW

    Roger Pack Guest


    > I am using Ruby/DL (dl/import) to load a dynamic library. It seems
    > that when I call a function of this library from Ruby, it is blocking.
    > Is it "normal", or am I doing something wrong? Is it possible to make
    > it non-blocking?


    Yeah, non blocking (true multi-threading) is considered to introduce
    complexity so it probably default to non true multi-thread.
    I know with jruby this is (probably) not the case, and with ffi you can
    set a method as non blocking, though it appears to have an annoying
    syntax, and would only be non-blocking with MRI 1.9+:
    http://groups.google.com/group/ruby...&q=rb_thread_blocking_region#8f3d9e93fc1025ca


    -r
    --
    Posted via http://www.ruby-forum.com/.
    Roger Pack, Sep 28, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hendra Gunawan
    Replies:
    1
    Views:
    12,414
    Allan Herriman
    Apr 8, 2004
  2. Andre Kelmanson

    blocking i/o vs. non blocking i/o (performance)

    Andre Kelmanson, Oct 10, 2003, in forum: C Programming
    Replies:
    3
    Views:
    912
    Valentin Tihomirov
    Oct 12, 2003
  3. nukleus
    Replies:
    14
    Views:
    816
    Chris Uppal
    Jan 22, 2007
  4. Christian
    Replies:
    5
    Views:
    720
    Esmond Pitt
    Dec 2, 2007
  5. Serge Savoie
    Replies:
    4
    Views:
    255
    Serge Savoie
    Oct 1, 2008
Loading...

Share This Page