From: Sub Zero Date: 2011-09-19T23:03:24+09:00 Subject: how to implement method with execution timeout expiration? Hi, Would you be so kind to advise me Player.get_action() implementation? It should return value within timeout regardless of @connection troubles. class Player def get_action( default_action, timeout_sec ) self.within_timeout( timeout_sec ) do @connection.get_action end || default_action end def Player.get_action timeout_sec &block # what should be here ??? ned end action = Player.new( "Peter" ).get_action :fold, 30 Thank you inadvance! -- Posted via http://www.ruby-forum.com/.