Hi,
Ruby 1.8.6
I accidentally made a rake task a prerequisite of itself like so:
task :foo => [:foo] do
puts “hello”
end
And I got this output:
stopping only thread
note: use sleep to stop forever
No complaints really. Just thought it was an odd error, and I got zero
hits when I searched the ruby-talk archives. Anyone have an
explanation?
Regards,
Dan
On 4/7/07, Daniel B. [email protected] wrote:
And I got this output:
stopping only thread
note: use sleep to stop forever
Maybe an infinite loop causing a stack overflow?
“Daniel B.” [email protected] writes:
And I got this output:
stopping only thread
note: use sleep to stop forever
No complaints really. Just thought it was an odd error, and I got zero
hits when I searched the ruby-talk archives. Anyone have an
explanation?
2#878lilith:~/mess/current$ ruby -e ‘Thread.stop’
-e:1:in `stop’: stopping only thread (ThreadError)
note: use sleep to stop forever from -e:1
rake.rb:
def invoke
@lock.synchronize do
…
end
end
In short, you dead-locked the Rack mutex.