mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Fix Leaked thread
				
					
				
			Sometimes `Leaked thread: Rinda::TestRingServer#test_ring_server_ipv6_multicast` happens because `Rinda::TupleSpace#start_keeper` runs after stopping `@keeper`.
This commit is contained in:
		
							parent
							
								
									40651cf1f5
								
							
						
					
					
						commit
						14eede6e53
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -623,6 +623,7 @@ class TestRingServer < Test::Unit::TestCase
 | 
				
			||||||
    @server = DRb.start_service("druby://localhost:0")
 | 
					    @server = DRb.start_service("druby://localhost:0")
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
  def teardown
 | 
					  def teardown
 | 
				
			||||||
 | 
					    @rs.shutdown
 | 
				
			||||||
    # implementation-dependent
 | 
					    # implementation-dependent
 | 
				
			||||||
    @ts.instance_eval{
 | 
					    @ts.instance_eval{
 | 
				
			||||||
      if th = @keeper
 | 
					      if th = @keeper
 | 
				
			||||||
| 
						 | 
					@ -630,7 +631,6 @@ class TestRingServer < Test::Unit::TestCase
 | 
				
			||||||
        th.join
 | 
					        th.join
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    @rs.shutdown
 | 
					 | 
				
			||||||
    @server.stop_service
 | 
					    @server.stop_service
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue