Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.7, JRuby 1.7.0.pre2
    • Fix Version/s: JRuby 1.7.0.RC1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The following program works differently under MRI and JRuby

      timeout = nil
      t=Thread.new do
      sleep 10
      end
      start = Time.now
      s = t.join(timeout)
      #Workaround: s = timeout ? t.join(timeout) : t.join
      puts "Took #

      {Time.now-start}

      seconds and returned #

      {s.inspect}

      "

      JRuby: Took 0.0 seconds and returned nil
      MRI: Took 10.000633 seconds and returned #<Thread:0x007fb14884f3b8 dead>

        Activity

        Hide
        Charles Oliver Nutter added a comment -
        commit 6bd8b1148418a066e84ad3bbed6a11f5344bf5a3
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Wed Sep 19 12:11:05 2012 -0500
        
            Fix JRUBY-6896: nil treated as 0 in call to Thread#join
        
        :000000 100644 0000000... d413551... A	spec/regression/JRUBY-6896_thread_join_with_nil_waits_forever.rb
        :100644 100644 6b55b87... 856833b... M	src/org/jruby/RubyThread.java
        
        
        Show
        Charles Oliver Nutter added a comment - commit 6bd8b1148418a066e84ad3bbed6a11f5344bf5a3 Author: Charles Oliver Nutter <headius@headius.com> Date: Wed Sep 19 12:11:05 2012 -0500 Fix JRUBY-6896: nil treated as 0 in call to Thread#join :000000 100644 0000000... d413551... A spec/regression/JRUBY-6896_thread_join_with_nil_waits_forever.rb :100644 100644 6b55b87... 856833b... M src/org/jruby/RubyThread.java

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Brad Pardee
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: