<aside> ๐ญ Index
</aside>
= main run loop
๋ฉ์ธ์ฐ๋ ๋์ ๋ฐ๋ฃจํ๋ค.
๋ฃจํ๋๊น ์ด๋ค ํ๋ก์ธ์ค๋ฅผ ๋ฐ๋ณตํ๋ ๊ฒ์ธ๋ฐ, ํ๋ก์ธ์ค๊ฐ ์ด๋ป๊ฒ ๋๋๋ฉดโฆ
OS ๋ฅผ ํตํด ๋ค์ด์จ ์ฌ์ฉ์ ์ด๋ฒคํธ๋ฅผ ์ฑ์ค๋ธ์ ํธ๊ฐ ๋ด๋น ํธ๋ค๋ง ์ค๋ธ์ ํธ์ ํ ๋นํจ
โ ์ด๋ฒคํธ ํธ๋ค๋ง ๊ฒฐ๊ณผ๋ก ์ฑ์ ์ํ์ ์ธํ์ด ๋ฐ๋๋ค
์์
์ค์ผ์ค๋ง
โ ์์ธํ ์ค๋ช
์ด ๋์์์ง ์์
ํ์ธ ์ง๋ฌธ
main event loop
๋ ๋ฉ์ธ ์ฐ๋ ๋๋ฅผ ์ํ run loop
์ด๋ค.
๋ฉ์ธ๋ฐ๋ฃจํ์์ Application object ๋
๋ฉ์ธ ์ด๋ฒคํธ ๋ฃจํ์ ํน์ง
What distinguishes the main event loop is that its primary input source receives events from the operating system that are generated by user actionsโfor example, tapping a view or entering text using a keyboard.
์ฐธ๊ณ ๋ก, ๋ฉ์ธ ๋ฐ ๋ฃจํ๋ฅผ ์ ์ธํ ๋ชจ๋ ๋ฐ ๋ฃจํ๋ ๊ฐ๋ฐ์์ ์ฝ๋์ ์ํด ์๋์ผ๋ก ์ค์ ๋๊ณ ์คํ๋์ด์ผํ๋ค.
The run loop must be configured and run manually by your code.
In Cocoa applications, the run loop for the main threadโthe main event loopโis run automatically by the application object.
main event loop ๊ฐ ์ฒ์ ์ค์ ๋๋ ์์