multithreading with an external library

Discussion in 'Ruby' started by David Garamond, Jan 4, 2004.

  1. I plan to use Ruby/DL with Firebird 1.5's "embedded server" DLL on
    win32. The goal is to provide an FB database server which can accept
    connections & commands (written in YAML) from other Ruby/Python/Perl
    programs.

    However, the embedded FB supports multiple connections with multiple
    threads. Since Ruby doesn't have "real" threads yet, can it be done with
    Ruby?

    If not, I'm gonna have to turn to Python, as it does OS threads and
    already has an excellent Python binding (kinterbasdb).

    --
    dave
     
    David Garamond, Jan 4, 2004
    #1
    1. Advertising

  2. David Garamond

    Paul Brannan Guest

    On Sun, Jan 04, 2004 at 08:37:39PM +0900, David Garamond wrote:
    > However, the embedded FB supports multiple connections with multiple
    > threads. Since Ruby doesn't have "real" threads yet, can it be done with
    > Ruby?


    One way to solve this is to have a layer that transfers messages to and
    from your threaded library and Ruby. This generally involves a
    thread-safe queue when sending messages to Ruby, and picking the right
    thread to send a message to when sending messages from Ruby. There are
    already some libraries out there that do this, but I can't remember
    which ones.

    Paul
     
    Paul Brannan, Jan 5, 2004
    #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. SpaceCowboy

    J2ME: How to load external library?

    SpaceCowboy, Aug 28, 2003, in forum: Java
    Replies:
    3
    Views:
    779
    Darryl L. Pierce
    Sep 3, 2003
  2. Scott Allen
    Replies:
    8
    Views:
    11,021
    Scott Allen
    May 2, 2004
  3. Brzezi

    Multithreading library

    Brzezi, Oct 19, 2004, in forum: C++
    Replies:
    2
    Views:
    3,425
    Catalin Pitis
    Oct 20, 2004
  4. Mellow Crow
    Replies:
    6
    Views:
    429
    Richard Cornford
    Nov 4, 2005
  5. Muffinman
    Replies:
    1
    Views:
    199
    James Kuyper
    Jan 23, 2013
Loading...

Share This Page