update threads.rb example