Hello, I have done a very basic implementation of a while back but I did not finish the modifications to the specs to test this.
Here are the commits if you want to grab it http://github.com/PascalN2/ironruby/commit/3a0373379b79dbe7fff603ad61ab726d7 de7f305 http://github.com/PascalN2/ironruby/commit/47f0de87e908981f553732e97f948a33b 164f202 It was decided at some point that there would only be 5 valid values -2, -1, 0, 1 and 2 ... mapping to the CLR thread priorities Lowest, BelowNormal, Normal, AboveNormal and Highest If anything lower than -2 is passed in the thread will be assigned Lowest and Highest if above 2. Pascal -----Original Message----- From: ironruby-core-boun...@rubyforge.org [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Shay Friedman Sent: October-25-09 3:55 PM To: ironruby-core@rubyforge.org Subject: Re: [Ironruby-core] Thread Priority Is it going to be implemented for V1? If yes, is it going to work as MRI with numeric values? Thanks! Shay. On 10/25/09, Tomas Matousek <tomas.matou...@microsoft.com> wrote: > Ruby Thread#priority is not implemented yet. We disabled name mangling on > built-ins recently so Thread.Priority property is not callable via > lower-case name anymore. > > Tomas > > -----Original Message----- > From: ironruby-core-boun...@rubyforge.org > [mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Shay Friedman > Sent: Saturday, October 24, 2009 11:10 PM > To: ironruby-core > Subject: [Ironruby-core] Thread Priority > > Hi guys, > > I've just noticed that something happened to Thread.priority... It > disappeared. > I'm talking about Thread's instance attribute - priority. I'm using the > latest code from GitHub. > > The only available priority in the Thread instance now is a CamelCase > priority, which is .Net's Priority attribute... > > Take a look at the next REPL session: > => #<Thread:0x000005e aborting> >>>> t = Thread.new { puts "Start"; sleep(30); puts "end" } > tart=> > #<Thread:0x0000060 run> >>>> t.priority > :0: undefined method `priority' for #<Thread:0x0000060 sleep> > (NoMethodError) > >>>> t.Priority > => Normal > > I remember the priority attribute was problematic because it didn't receive > numeric values like MRI. Maybe this is related to that? > > Thanks, > Shay. > > -- > -------------------------------------------------- > Shay Friedman > Author of IronRuby Unleashed > http://www.IronShay.com > Follow me: http://twitter.com/ironshay > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core@rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > -- -------------------------------------------------- Shay Friedman Author of IronRuby Unleashed http://www.IronShay.com Follow me: http://twitter.com/ironshay _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core _______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core