what if rb_eval_string_protect() takes too long?

Discussion in 'Ruby' started by Phlip, Sep 10, 2004.

  1. Phlip

    Phlip Guest

    Rubies:

    Just out of curiosity, suppose a C++ host wants to evaluate a Ruby string,
    and that might run long.

    Suppose putting Ruby into a thread were against my religion, or something.

    Is there a lower level eval() that operates one tick of the Ruby interpreter
    at a time? Then I could call it in a loop, and provide a Cancel button for
    it.

    The other cheap workaround, besides threads, is write a C++ function called
    detectCancellation(), bind it to Ruby, and call it from the bottom of the
    activities inside the evaluated string.

    --
    Phlip
    http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
    Phlip, Sep 10, 2004
    #1
    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. Chuck Swart

    bata takes too long with sun

    Chuck Swart, Sep 13, 2003, in forum: VHDL
    Replies:
    1
    Views:
    453
    Chuck Swart
    Sep 13, 2003
  2. Son KwonNam
    Replies:
    3
    Views:
    2,294
    Steve Horsley
    May 12, 2004
  3. Replies:
    0
    Views:
    566
  4. JVRudnick

    CDOSYS executes but takes TOO TOO long?

    JVRudnick, Feb 20, 2008, in forum: ASP General
    Replies:
    13
    Views:
    276
    JVRudnick
    Feb 28, 2008
  5. Phlip
    Replies:
    6
    Views:
    177
    Phlip
    Sep 24, 2004
Loading...

Share This Page