Kotlin/8. Thread
8.6 Priority
yswn1531
2023. 10. 10. 17:51
Priority
val threadPriority = Thread()
threadPriority.setPriority(1)
- 모든 Thread는 우선순위를 가진다.
- 쓰레드를 생성하면 기본적으로 NORM_PRIORITY = 5 를 갖는다.
- 1~10까지 존재 / MIN_PRIORITY = 1, MAX_PRIORITY = 10