java.util.concurrent
ÀÎÅÍÆäÀ̽º ThreadFactory
public interface ThreadFactory
¿ä±¸¿¡ ÀÀÇØ »õ·Î¿î thread¸¦ ÀÛ¼ºÇÏ´Â °´Ã¼. thread ÆÑÅ丮¸¦ »ç¿ëÇϸé, new Thread
È£ÃâÀÇ Çϵå Á¢¼ÓÀÌ »èÁ¦µÇ¾î ¾îÇø®ÄÉÀ̼ÇÀÌ Æ¯¼öÇÑ thread ¼ºê Ŭ·¡½º, ¿ì¼±µµµîÀ» »ç¿ëÇÒ ¼ö ÀÖ°Ô µË´Ï´Ù.
ÀÌ ÀÎÅÍÆäÀ̽ºÀÇ °¡Àå ´Ü¼øÇÑ ±¸ÇöÀ» ´ÙÀ½¿¡ ³ªÅ¸³À´Ï´Ù.
class SimpleThreadFactory implements ThreadFactory {
public Thread newThread(Runnable r) {
return new Thread(r);
}
}
Executors.defaultThreadFactory()
¸Þ¼µå´Â ÀÛ¼ºµÈ thread ÄÁÅØ½ºÆ®¸¦ ±âÁ¸ÀÇ °ªÀ¸·Î ¼³Á¤ÇÏ°í ³ª¼ µ¹·ÁÁÖ´Â º¸´Ù À¯¿ëÇÏ°í ´Ü¼øÇÑ ±¸ÇöÀ» Á¦°øÇÕ´Ï´Ù.
- µµÀÔµÈ ¹öÀü
:
- 1.5
newThread
Thread newThread(Runnable r)
- »õ·Î¿î Thread¸¦ ±¸ÃàÇÕ´Ï´Ù. ±¸ÇöÀº ¿ì¼±µµ, À̸§, demon »óÅÂ, ThreadGroup µîÀÇ Ãʱâȵµ ½Ç½ÃÇÕ´Ï´Ù.
- ÆÄ¶ó¹ÌÅÍ:
r
- »õ·Î¿î thread ÀνºÅϽº¿¡ ÀÇÇØ ½ÇÇàµÇ´Â runnable
- ¹Ýȯ°ª:
- ÀÛ¼ºµÈ thread
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ
ÂüÁ¶ÇϽʽÿÀ.