¾È±Ô °øºÎ¹æ

Android > Thread ÁÖ¿ä ¸Þ¼­µå

µî·ÏÀÏ : 2017-07-06 17:22 Á¶È¸¼ö : 53,184

½º·¹µåÀÇ ÁÖ¿ä ¸Þ¼­µå

currentThread()
ÇöÀç ½ÇÇàÁßÀÎ ½º·¹µå ¹Ýȯ

getid()
½º·¹µå ¾ÆÀ̵ð ¹Ýȯ

holdsLock(Object object)
¸ðµç ÀÚ¹Ù°´Ã¼´Â monitor¶ó´Â Àá±Ýº¯¼ö¸¦ °¡Áö°í ÀÖ´Ù. ¾î¶² ½º·¹µå°¡ ¾î¶² °´Ã¼¸¦ »ç¿ëÇϱâ À§ÇØ ¸ð´ÏÅ͸¦ °É¾îµÎ¸é
´Ù¸¥ ½º·¹µå´Â ±× °´Ã¼¸¦ »ç¿ëÇÏÁö ¸øÇÑ´Ù.  ¸ð´ÏÅ͸¦ °Ç ½º·¹µå°¡ ¸ð´ÏÅ͸¦ Ç®¾îÁÖ¾î¾ß ´Ù¸¥ ½º·¹µå°¡ °´Ã¼¸¦ »ç¿ë°¡´É

sleep(long time)
ÁöÁ¤µÈ ½Ã°£ µ¿¾È ´ë±â, ´ÜÀ§´Â 1/1000ÃÊ

sleep(long millis , int nanos)
ÁöÁ¤µÈ ¹Ð¸®ÃÊ + ³ª³ëÃÊ µ¿¾È ´ë±â

getName()
½º·¹µåÀÇ À̸§À» ¹Ýȯ

setName(String threadName)
½º·¹µåÀÇ À̸§À» ¼³Á¤

start()
½º·¹µåÀÇ ½ÃÀÛ, run()¸Þ¼­µå°¡ ½ÇÇàµÈ´Ù.

getPriority()
¿ì¼±¼øÀ§ ¹Ýȯ

setPriority(int priority)
¿ì¼±¼øÀ§ ¼³Á¤

isAlive()
½º·¹µå°¡ ½ÃÀ۵Ǿú°í Á¾·áµÇÁö ¾Ê¾ÒÀ¸¸é true

join()
ÇÑ ½º·¹µå°¡ ³¡³¯¶§±îÁö ´Ù¸¥ ½º·¹µå´Â ´ë±â

run()
½º·¹µå°¡ ½ÇÇàÇÒ ÀÛ¾÷³»¿ë, ÇÏÀ§Å¬·¡½º¿¡¼­ ¿À¹ö¶óÀ̵å ÇÏ¿© »ç¿ëÇÑ´Ù.

interrupt()
Á¾·á¸¦ À§ÇÑ ÀÎÅÍ·´Æ® ¿äû. °ú°Å´Â stop()À» »ç¿ëÇÏ¿´À¸³ª ÇöÀç´Â ÀÌ ¸Þ¼­µå·Î Á¾·á ¿äû

interrupted()
ÇöÀç ½ÇÇàÁßÀÎ ½º·¹µå¸¦ Á¾·áÇϱâ À§ÇØ ´Ù¸¥ ½º·¹µå¿¡¼­ ÀÎÅÍ·´Æ® ¿äûÀ» ÇÏ¿´´ÂÁö È®ÀÎÇÏ´Â ¸Þ¼­µå

isInterrupted()
½º·¹µå°¡ ÀÎÅÍ·´Æ®¸¦ ¹Þ¾Ò´ÂÁö È®ÀÎ
 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.