[#8484] strptime fails to properly parse certain inputs — <noreply@...>

Bugs item #5263, was opened at 2006-08-01 23:14

13 messages 2006/08/02
[#8485] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — Yukihiro Matsumoto <matz@...> 2006/08/02

Hi,

[#8538] Re: [ ruby-Bugs-5263 ] strptime fails to properly parse certain inputs — nobu@... 2006/08/06

Hi,

[#8561] sandbox timers & block scopes — why the lucky stiff <ruby-core@...>

Two puzzles I am trying to solve:

28 messages 2006/08/08
[#8624] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

raise ThisDecayingInquisition, "anyone? anyone at all?"

[#8627] Re: sandbox timers & block scopes — MenTaLguY <mental@...> 2006/08/15

On Wed, 2006-08-16 at 00:35 +0900, why the lucky stiff wrote:

[#8628] Re: sandbox timers & block scopes — why the lucky stiff <ruby-core@...> 2006/08/15

On Wed, Aug 16, 2006 at 02:46:30AM +0900, MenTaLguY wrote:

[#8629] Re: sandbox timers & block scopes — "Charles O Nutter" <headius@...> 2006/08/15

On 8/15/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:

[#8690] a ruby-core primer — why the lucky stiff <ruby-core@...>

Hello, all. I've been working on the ruby-core page for the new Ruby site.

21 messages 2006/08/22

Re: sandbox timers & block scopes

From: MenTaLguY <mental@...>
Date: 2006-08-16 15:50:29 UTC
List: ruby-core #8646
On Wed, 2006-08-16 at 13:39 +0900, MenTaLguY wrote:
> The only way I know of to bypass it is with a call to a continuation,
> since that doesn't unwind the stack in quite the normal way.
> Unfortunately, you can't just toss a continuation into another thread
> like you can an exception.

I've got one last thought on this:  maybe I'm looking at the problem the
wrong way around.  i.e., maybe the thing to do is to perform Sandbox
evals in separate threads (perhaps from a sandbox thread pool, if thread
startup overhead matters).

For instance:

 t = Thread.new { do_eval( str ) }
 t.join( timeout )
 if t.status != "dead"
   t.kill!
   raise TimeoutException, "timeout exceeded"
 end
 t.value

Now, this still requires some interpreter hacking to do an ensure-less
kill (our hypothetical Thread#kill!), but I think it's a much easier
problem to unceremoneously blow away a thread than it is to carefully
unwind the stack partway whilst still sidestepping ensure.

(You do still need to capture and relay exceptions raised in the thread,
but that's not too hard.  It'd be even easier if there were a
Thread#value analog for exceptions.)

-mental

Attachments (1)

signature.asc (191 Bytes, application/pgp-signature)

In This Thread