[#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: "Francis Cianfrocca" <garbagecat10@...>
Date: 2006-08-16 09:45:46 UTC
List: ruby-core #8642
On 8/8/06, why the lucky stiff <ruby-core@whytheluckystiff.net> wrote:
> 1. Ruby uses setitimer to switch threads.  I would like to use setitimer as well
> to abort a sandbox which runs longer than its timeout.  Can anyone recommend a
> signal which can be used for this?  Or could I get access to the thread
> switching routine so I can check sandbox timeouts between threads?  Or, perhaps
> there is another strategy.

I'm not sure if I'm about to repeat what Charles has already said, but
how about you add a structure inside the interpreter loop that gets a
value added to it whenever a timed sandbox starts up (and removed
whenever it completes)? There can be multiple sandbox timeouts active
at a time, so you can do this from multiple green threads. The
structure contains the real time at which each timeout expires, and
the associated thread descriptor. Add something to the interpreter
loop that runs down the expired timeouts every time through, and
raises a Ruby exception to each expiring sandbox. It's heavyweight
because of the kernel-lock needed to check the time but maybe Ruby is
already doing that somewhere else.

In This Thread