From: Nobuyoshi Nakada Date: 2007-05-16T13:48:25+09:00 Subject: Re: rb_yield(), semaphores and 'break' Hi, At Wed, 16 May 2007 12:05:04 +0900, Pete wrote in [ruby-talk:251758]: > >Have you tried rb_ensure()? > Yes. That's what I was referring to. I can 'capture' the break > with a function pointed to by an rb_ensure call, but the problem > is that the 'body' part of that call is *still* sitting on the > semaphore, so that if I release it from the ensure section, it > is too late -- the stack is already popped. It tries to return > at that point, and Boom! At least that's what seems to be happening. > Unless someone can correct me... Still I'm not sure about your situation. What do you mean by "sitting" and "popped"? To where trying to "return"? Can't you show simplified code? -- Nobu Nakada