2018-04-26Techc, Japanese, Ruby (English Version) Rubyã®ã¹ã¬ããåãæ¿ãã®ããªã¬ã¼ã¯ï¼ æ¨æ¥åå ããkawasaki.rbã§ãã¹ã¬ããã®å®è¡ã®åãæ¿ããã®ã¿ã¤ãã³ã°ãããåãããªããã¨ãã話é¡ãã§ã¾ããã Ruby1.9ã§ãã¤ãã£ãã¹ã¬ãããç¨ããæ¹å¼ã«ãªã£ãããã©ãGVL(Giant VM Lock)ã®ä»çµã¿ã§IO以å¤ã®å¦çã§ã¯åæã«å®è¡ãããã¹ã¬ããã¯ï¼ä¸ã¤ã«å¶å¾¡ããã¦ãããã¨ãããããªèª¬æããããã§è¦ããã¾ããã ããIOå¦çãã¹ãªã¼ãã®ã¿ã¤ãã³ã°ã§ããã¹ã¬ãããåãæ¿ãããªãã¨ããã¨ãä¸è¨ã®ãããªã¹ã¬ããå ã§ãã¸ã¼ã«ã¼ããªå¦çããã¦ããã³ã¼ããåããã¨ã»ã»ã» for item in %w(first second third) puts item Thread.fork item do |param| (1..10000).ea
{{#tags}}- {{label}}
{{/tags}}