[#15707] Schedule for the 1.8.7 release — "Akinori MUSHA" <knu@...>

Hi, developers,

21 messages 2008/03/01

[#15740] Copy-on-write friendly garbage collector — Hongli Lai <hongli@...99.net>

Hi.

31 messages 2008/03/03
[#15742] Re: Copy-on-write friendly garbage collector — Yukihiro Matsumoto <matz@...> 2008/03/03

Hi,

[#15829] Re: Copy-on-write friendly garbage collector — Daniel DeLorme <dan-ml@...42.com> 2008/03/08

Yukihiro Matsumoto wrote:

[#15756] embedding Ruby 1.9.0 inside pthread — "Suraj Kurapati" <sunaku@...>

Hello,

18 messages 2008/03/03
[#15759] Re: embedding Ruby 1.9.0 inside pthread — Nobuyoshi Nakada <nobu@...> 2008/03/04

Hi,

[#15760] Re: embedding Ruby 1.9.0 inside pthread — Yukihiro Matsumoto <matz@...> 2008/03/04

Hi,

[#15762] Re: embedding Ruby 1.9.0 inside pthread — "Suraj N. Kurapati" <sunaku@...> 2008/03/04

Yukihiro Matsumoto wrote:

[#15783] Adding startup and shutdown to Test::Unit — Daniel Berger <Daniel.Berger@...>

Hi all,

15 messages 2008/03/04

[#15835] TimeoutError in core, timeouts for ConditionVariable#wait — MenTaLguY <mental@...>

I've been reworking JRuby's stdlib to improve performance and fix

10 messages 2008/03/09

[#15990] Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...>

Hi,

35 messages 2008/03/23
[#15991] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/23

[#15993] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/23

Hi Dave,

[#15997] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/23

[#16024] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/26

Hi Dave,

[#16025] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16026] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16027] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16029] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16030] Re: Recent changes in Range#step behavior — Yukihiro Matsumoto <matz@...> 2008/03/26

Hi,

[#16031] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16032] Re: Recent changes in Range#step behavior — "Vladimir Sizikov" <vsizikov@...> 2008/03/26

On Wed, Mar 26, 2008 at 7:01 PM, Dave Thomas <dave@pragprog.com> wrote:

[#16033] Re: Recent changes in Range#step behavior — Dave Thomas <dave@...> 2008/03/26

[#16041] Re: Recent changes in Range#step behavior — David Flanagan <david@...> 2008/03/26

Dave Thomas wrote:

Re: File.flock in ruby 1.9.0

From: llin <cheempz@...>
Date: 2008-03-05 08:25:53 UTC
List: ruby-core #15795
A follow-up, for ruby 1.9.0 (2008-03-01 revision 0) [i686-linux].

It seems the blocking issue is gone, but now flock'ing with
File::LOCK_NB returns 0 regardless of whether the file can be locked.
Example irb session below:

irb(main):001:0> f = File.new('foo')
=> #<File:foo>
irb(main):002:0> f.flock(File::LOCK_EX)
=> 0
irb(main):003:0> f2 = File.new('foo')
=> #<File:foo>
irb(main):004:0> f2.flock(File::LOCK_EX | File::LOCK_NB)
=> 0
irb(main):005:0> f2.flock(File::LOCK_EX)
(...hangs, aborting with Ctl-C...)
IRB::Abort: abort then interrupt!!
        from /usr/local/lib/ruby/1.9.0/irb.rb:80:in `irb_abort'
        from /usr/local/lib/ruby/1.9.0/irb.rb:246:in `signal_handle'
        from /usr/local/lib/ruby/1.9.0/irb.rb:65:in `block in start'
        from (irb):5:in `flock'
        from (irb):5
        from /usr/local/lib/ruby/1.9.0/irb.rb:149:in `block (2 levels)
in eval_input'
        from /usr/local/lib/ruby/1.9.0/irb.rb:262:in `signal_status'
        from /usr/local/lib/ruby/1.9.0/irb.rb:146:in `block in
eval_input'
        from /usr/local/lib/ruby/1.9.0/irb.rb:145:in `eval_input'
        from /usr/local/lib/ruby/1.9.0/irb.rb:69:in `block in start'
        from /usr/local/lib/ruby/1.9.0/irb.rb:68:in `catch'
        from /usr/local/lib/ruby/1.9.0/irb.rb:68:in `start'
        from /usr/local/bin/irb-1.9:12:in `<main>'
irb(main):006:0> f.flock(File::LOCK_UN)
=> 0
irb(main):007:0> f2.flock(File::LOCK_EX)
=> 0
irb(main):008:0>

-Lin

On Feb 27, 5:51 pm, ts <dec...@moulon.inra.fr> wrote:
> >>>>> "l" == llin  <chee...@gmail.com> writes:
>
> l> I'm having trouble getting File.flock to work in non-blocking mode, in
> l> ruby 1.9.0 (on CentOS 5).  The same code (show below in irb session)
> l> works in ruby 1.8.5, but in 1.9.0 the attempt to lock in non-blocking
> l> mode will block.  Has anyone else experienced this?  Any help or
> l> suggestions would be much appreciated!
>
>  The problem is that 1.8.6 test if LOCK_NB was given, or if ruby has only
>  one thread when it call flock(2), what not do apparently 1.9. Is this
>  volontary ?
>
> Guy Decoux

In This Thread