精華區beta Ruby 關於我們 聯絡資訊
※ 引述《contagious (布穀飽吃不堡)》之銘言: : 1. ruby 的這種模擬出來的 thread 叫 "gren thread"。系統提供的thread 叫 "native thread" : 所以那篇說 : "Ruby 2.0 would support neither continuations nor green threads. " : 實在很奇怪,這樣是指沒有模擬的 thread 了嗎? Green Thread 是 SunOS 稱呼 Light-Weight Process 的別名, 同時可見於 FreeBSD 家族,在這類定義之下,可能不算是模擬。 但如果用後來 JVM 的定義又不一樣了: http://java.sun.com/docs/hotspot/threads/threads.html 如果 Ruby 有新的 interpreter,或是向 JRuby 的作法靠攏, 那或許會跟 JVM 定義的類似,這是我對 http://headius.blogspot.com/2006/10/another-year-another-interpreter.html 這篇文章的理解。 至於 thread 和效能的關聯,通常在 database 部分比較會有感覺, 而那是 database 和 OS 之間的問題。 因此我大致上也認為,這不是 Ruby 效能的瓶頸。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.105.131.104 ※ 編輯: b6s 來自: 59.105.131.104 (11/04 04:18) ※ 編輯: b6s 來自: 59.105.131.104 (11/04 04:26)