[#5322] O(1) performance for insertions/deletions at the front of an Array/String — Eric Mahurin <eric_mahurin@...>

I just did some benchmarks on push, pop, shift, and unshift

24 messages 2005/07/01
[#5338] Re: O(1) performance for insertions/deletions at the front of an Array/String — Mathieu Bouchard <matju@...> 2005/07/02

On Fri, 1 Jul 2005, Eric Mahurin wrote:

[#5348] Re: O(1) performance for insertions/deletions at the front of an Array/String — Eric Mahurin <eric_mahurin@...> 2005/07/02

--- Mathieu Bouchard <matju@artengine.ca> wrote:

[#5357] Re: O(1) performance for insertions/deletions at the front of an Array/String — Mathieu Bouchard <matju@...> 2005/07/03

On Sat, 2 Jul 2005, Eric Mahurin wrote:

[#5359] Re: O(1) performance for insertions/deletions at the front of an Array/String — Eric Mahurin <eric_mahurin@...> 2005/07/03

--- Mathieu Bouchard <matju@artengine.ca> wrote:

[#5361] Re: O(1) performance for insertions/deletions at the front of an Array/String — Mathieu Bouchard <matju@...> 2005/07/03

On Sun, 3 Jul 2005, Eric Mahurin wrote:

[#5362] Re: O(1) performance for insertions/deletions at the front of an Array/String — Eric Mahurin <eric_mahurin@...> 2005/07/03

--- Mathieu Bouchard <matju@artengine.ca> wrote:

[#5365] Re: O(1) performance for insertions/deletions at the front of an Array/String — Yukihiro Matsumoto <matz@...> 2005/07/04

Hi,

[#5367] Re: O(1) performance for insertions/deletions at the front of an Array/String — Eric Mahurin <eric_mahurin@...> 2005/07/04

--- Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#5368] Re: O(1) performance for insertions/deletions at the front of an Array/String — Yukihiro Matsumoto <matz@...> 2005/07/04

Hi,

[#5372] Re: O(1) performance for insertions/deletions at the front of an Array/String — Florian Gro<florgro@...> 2005/07/04

Yukihiro Matsumoto wrote:

[#5420] Sydney Developer Preview 1 released — Evan Webb <evanwebb@...>

Sydney, an experimental ruby interpreter, has been released!

15 messages 2005/07/11
[#5424] Re: [ANN] Sydney Developer Preview 1 released — Evan Webb <evanwebb@...> 2005/07/12

Thanks everyone for the feedback so far!

[ ruby-Bugs-2186 ] thread scheduling problem with io on files in /proc on 1.8.2

From: noreply@...
Date: 2005-07-29 19:29:29 UTC
List: ruby-core #5518
Bugs item #2186, was opened at 2005-07-29 14:23
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=2186&group_id=426

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Paul Brannan (cout)
Assigned to: Nobody (None)
Summary: thread scheduling problem with io on files in /proc on 1.8.2

Initial Comment:
On SuSE 9.1 (kernel 2.6.5), the following program outputs:
-- 1 --

and then hangs.  It should instead output:
-- 1 --
-- 2 --
test.rb:15:in `wakeup': killed thread (ThreadError)

The weird part is that it only seems to happen with files in the /proc filesystem.

Here's the code:

t = Thread.new do
  Thread.current.abort_on_exception = true
  # File.open('/etc/passwd') do |file| # <-- works fine
  File.open('/proc/loadavg') do |file| # <-- hangs in gets
    puts "-- 1 --"
    line = file.gets

    puts "-- 2 --"
  end
end

# uncomment the following line and the program runs fine
# loop { t.wakeup }

Thread.stop


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=2186&group_id=426

In This Thread

Prev Next