看板 Ruby 關於我們 聯絡資訊
呃呃呃,用 utf-8 的 ptt 發文結果當掉 orz 重打 ※ 引述《wwwc (郭大維老師大好人)》之銘言: : 其實我要做的事情比較像這樣 : server = TCPServer.new(ip, port) : a = 0 : t = Thread.new{ : #計算accept的次數 : while server.accept : a += 1 case a when 50: 通知某人 when 60: 通知某人 end : end : } 這樣會不會好些? 千萬不要放空 loop, 太吃資源了 至於 p 那個,我還要再去看 ruby src, 這樣猜我想不到會是什麼問題 -- In Lisp, you don't just write your program down toward the language, you also build the language up toward your program. 《Programming Bottom-Up》- Paul Graham 1993 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.117.166.175
wwwc:感謝! 11/01 17:54