You might want to take a look at Eventmachine 
(http://eventmachine.rubyforge.org). You can run another thread (up to 
20) within your main one with defer() while the main one keeps on 
working.

Dimitri De Frenne

Emmanuel Emmanuel wrote:
> Caleb Clausen wrote:
>> On 5/29/10, Emmanuel Emmanuel <emmanuel.bacry / polytechnique.fr> wrote:
>>> so no way I can parse it to understand where to insert the yield
> 
> 
> Thank you for both of you !!
> It really helps me.
> Now just one remark to Caleb :
> 
>> bypass your timeout. If you put user code in a separate process, it
>> would be somewhat harder for them to bypass the timeout, but I think
>> still possible.
> 
> Sure ! I 100% agree !
> Now the big question (that I don't know the answer) is how do I 
> interrupt the evaluation of
> a ruby script from another process ?? (and I want somthing that works on 
> all platforms ....)
> 
> If you know the answer to that, please let me know (and I don't want to 
> just kill the process, I want to interrupt the evaluation)
> 
> Emmanuel

-- 
Posted via http://www.ruby-forum.com/.