ååã®æ稿ã§ã¯sleep sort㨠ããã«å¯¾æããrunning sortãç´¹ä»ããã sleep sortã«å¯¾æãã¦running sortã ï¼ï¼å¤±æã«çµããç·¨ï¼ ãããã®ã¢ã«ã´ãªãºã ã§ã¯Rubyã®Threadã使ã£ããã© Threadã£ã¦ãªããæ¯åæ¸ãæ¹ãå¿ããã å¼æ°ã®åã渡ãæ¹ã¨ãjoinã¨ã ãã£ã¨ç°¡åã«ã¹ã¬ããã£ã³ã°ãããã®ã«ãã... ããã§Enumerableãªãªãã¸ã§ã¯ãã«å¯¾ã㦠渡ãããããã¯ã並åå¦çãã¦ããã ã¡ã½ãããããã°ä¾¿å©ããªã¨èãããã ã ãããªãã¹ã¬ããã®å®è£ ã®ãã¨ãå¿ã㦠対象ã®å¦çã®ãã¨ã ãèããã°ããããã 㧠Enumerable#thread_withã¨ããã¡ã½ãããæ¸ãã¦ã¿ãã*1 module Enumerable def thread_with mem = [] map do |*item| Thread.new(*item) do |
{{#tags}}- {{label}}
{{/tags}}