Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > what if rb_eval_string_protect() takes too long?

Reply
Thread Tools

what if rb_eval_string_protect() takes too long?

 
 
Phlip
Guest
Posts: n/a
 
      09-10-2004
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/bi...UserInterfaces


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CDOSYS executes but takes TOO TOO long? JVRudnick ASP General 13 02-28-2008 03:03 PM
code takes too long to execute Wizumwalt@gmail.com Java 16 09-14-2005 08:04 AM
stored procedure takes too much time to execute nicholas ASP .Net 7 08-03-2005 07:20 PM
Socket open to inavailable IP takes too long time Son KwonNam Java 3 05-12-2004 07:04 PM
bata takes too long with sun Chuck Swart VHDL 1 09-13-2003 12:55 AM



Advertisments