Cocoaé¢è¥¿åå¼·ä¼#49ã«åå ãã¦ï¼ãã«ãã¹ã¬ããããã°ã©ãã³ã°ã«ã¤ãã¦è©±ãã¦ãã¾ããï¼ ã¹ã©ã¤ãã¯ä»¥ä¸
æ¬å½ã«ä¼ãããã£ããã¨
- ãã£ã³ã»ã«å¿
è¦ãªãè¿·ãã
NSOperationQueue
ã使ã - ã»ã¬ã¯ã¿ã®ãã¨ã¯å«ãã«ãªã£ã¦ã
NSOperationQueue
ã®ãã¨ã¯å«ãã«ãªããªãã§ãã ããï¼ - Cocoaãªããã«ãã¹ã¬ããããã°ã©ãã³ã°ã¯ç°¡åï¼è¿·ããé²ãï¼
質åã«ã¤ãã¦
@ninjinkunããã®åæã«ã¤ãã¦ã®ããã³ã
ã¿ã¹ã¯ã®éä¸ã§å¾ ã£ã¦ï¼ã£ã¦ãã表ç¾ããã¾ãããã©ï¼ééãã§ããï¼
task1 task2 task3 WAIT task4 task5 task6
ã¿ããã«task1 -> task4
ï¼task2 -> task5
, task3 -> task6
ã®ãããªä¾åé¢ä¿ãæã£ã¦ããï¼task1-3
ã®å®äºãå¾
ã£ã¦ï¼task4-6
ãå®è¡ããå¿
è¦ãããã¨ãï¼WAIT
ã§task1-3
ãåä¸ã®queue
ã®ä¸ã§å¾
ã¤ã¨ãããã¨ãã§ããã¨ããæå³ã§ããï¼ããã¯ä¾åé¢ä¿ã ãã§ã¯å®ç¾ã§ããªãã¨æãã¾ãï¼
@kanizaããããã®ããã³ã
NSOperationQueue
ãGCD
ã¿ããã«globalã«queueãããã°ä¾¿å©ãããªããã¨ãããã¨ã§ãããï¼ãããã£ã¡ããã¨NSOperationQueue
ãGCD
ã«åãåªä½ç¹ã§ããï¼ãã£ã³ã»ã«ããããã¨ããç¹ãæ£ã¦ããã¨ã«ãªãã¾ãï¼ãªããªãï¼éå¤ãªã¿ã¹ã¯ãaddããã¦ãã¾ãã¨ãããã¯ãã£ã³ã»ã«ãã¦ããããã©ï¼ããã¯ãã¡ãã¿ãããªç¶æ
ãçºçããããã§ãï¼queueã¯ç®çãã¨ã«åãã¦çæãï¼ä¿æããã»ããããã§ãããï¼
è¨ããã³ãããã¨
ãã«ãã¹ã¬ããããã°ã©ãã³ã°ã«ã¤ãã¦ã¯ä»¥ä¸ã®ããã¥ã¡ã³ãã詳ããã§ãï¼ https://developer.apple.com/library/mac/#documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008091-CH1-SW1
Blocks, ARC, GCDã«ã¤ãã¦ã¯ï¼ã¨ãã¹ãã¼ãObjective-Cããã°ã©ãã³ã°ãèªãã®ãä¸çªããã¨æãã¾ãï¼
- ä½è : åæ¬ä¸æ¨¹
- åºç社/ã¡ã¼ã«ã¼: ã¤ã³ãã¬ã¹ã¸ã£ãã³
- çºå£²æ¥: 2011/11/18
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 8人 ã¯ãªãã¯: 343å
- ãã®ååãå«ãããã° (22件) ãè¦ã
ãã ãï¼dispatch_sourceã«ã¤ãã¦ã®è¨è¿°ã¯ãªãã®ã§ï¼ããã«é¢ãã¦ã¯Appleã®ããã¥ã¡ã³ã(ä¸ã®ãã¤)ã¨ããé©å®åç §ãã¦ãã ããï¼
ã©ãã§ããããã¨
çºè¡¨ä¸ã«ç´¹ä»ããããã¨åé¿ããã£ãã¨ã³ããªã¯ãã¡ãã§ã
æå¾ã«
ã¤ããªãçºè¡¨ã§ãããèãã¦ãã ãããããã¨ããããã¾ããï¼å¤§å¤è¯ãçµé¨ã«ãªãã¾ããï¼ ãã¨Haskellæé«ãªãã§ï¼èå³ããã°ãããHæ¬èªæ¸ä¼ã«åå ãã¦ãã ããï¼
追è¨
ã¯ã¦ãTããã ãã¾ããï¼ twitter.com/yashigani/statâ¦
— ããã³ã¨ã¿ã¤ã«ã¬ã¼ (@yashigani) March 30, 2013