ååã®è¨äº(Scala ExecutionContextã£ã¦ä½ / Futureã¯ã¹ã¬ããç«ã¡ä¸ããããªãã - ã¾ããã) 㧠import scala.concurrent.ExecutionContext.Implicits.global ã¨ã¯ä½ãªã®ãããããã ExecutionContext ã¨ã¯ ã¨ãããã¨ã«ã¤ãã¦è§£èª¬ããã ãããã ExecutionContext 㯠ã¹ã¬ãããã¼ã«ãæã£ã¦ãã¦ãããã«ã¿ã¹ã¯ãå²ãå½ã¦ãæ©æ§ ExecutionContext.Implicits.global ã¯ããã©ã«ãã§ã¯CPUã³ã¢æ°åã®ã¹ã¬ãããæã£ã¦ãã Futureå ã§Thread.sleepã¯ãæ³åº¦ ExecutionContext.Implicits.global ã使ã£ã¦ããç¶æ ã§Thread.sleepãããã¨é常ã«è¿·æã«ãªããã¨ãããã ä¾ãã°æ¬¡ã®ãããªã³ã¼ãããã£ãã¨ã
{{#tags}}- {{label}}
{{/tags}}