JavaỊ̈߳ºÐÂÌØÕ÷ ×èÈû¶ÓÁÐ
JavaỊ̈߳ºÐÂÌØÕ÷-×èÈû¶ÓÁÐ
×èÈû¶ÓÁÐÊÇJava5Ïß³ÌÐÂÌØÕ÷ÖеÄÄÚÈÝ£¬Java¶¨ÒåÁË×èÈû¶ÓÁеĽӿÚjava.util.concurrent.BlockingQueue£¬×èÈû¶ÓÁеĸÅÄîÊÇ£¬Ò»¸öÖ¸¶¨³¤¶ÈµÄ¶ÓÁУ¬Èç¹û¶ÓÁÐÂúÁË£¬Ìí¼ÓÐÂÔªËصIJÙ×÷»á±»×èÈûµÈ´ý£¬Ö±µ½ÓпÕλΪֹ¡£Í¬Ñù£¬µ±¶ÓÁÐΪ¿Õʱºò£¬ÇëÇó¶ÓÁÐÔªËصIJÙ×÷ͬÑù»á×èÈûµÈ´ý£¬Ö±µ½ÓпÉÓÃÔªËØΪֹ¡£
ÓÐÁËÕâÑùµÄ¹¦ÄÜ£¬¾ÍΪ¶àÏ̵߳ÄÅŶӵȺòµÄÄ£ÐÍʵÏÖ¿ª±ÙÁ˱ã½ÝͨµÀ£¬·Ç³£ÓÐÓá£
java.util.concurrent.BlockingQueue¼Ì³ÐÁËjava.util.Queue½Ó¿Ú£¬¿ÉÒԲο´APIÎĵµ¡£
ÏÂÃæ¸ø³öÒ»¸ö¼òµ¥Ó¦ÓõÄÀý×Ó£º
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ArrayBlockingQueue;
/**
* JavaỊ̈߳ºÐÂÌØÕ÷-×èÈû¶ÓÁÐ
*
* @author leizhimin 2009-11-5 14:59:15
*/
public class Test {
public static void main(String[] args) throws InterruptedException {
BlockingQueue bqueue = new ArrayBlockingQueue(20);
for (int i = 0; i < 30; i++) {
//½«Ö¸¶¨ÔªËØÌí¼Óµ½´Ë¶ÓÁÐÖУ¬Èç¹ûûÓпÉÓÿռ䣬½«Ò»Ö±µÈ´ý£¨Èç¹ûÓбØÒª£©¡£
bqueue.put(i);
System.out.println("Ïò×èÈû¶ÓÁÐÖÐÌí¼ÓÁËÔªËØ:" + i);
}
System.out.println("³ÌÐòµ½´ËÔËÐнáÊø£¬¼´½«Í˳ö----");
}
}
Ïà¹ØÎĵµ£º
1. Java¶ÁÈ¡Excel·½Ê½¶Ô±È
ÔÚJavaÖжÁдMS ExcelÎļþÖ÷ÒªÓÐÁ½ÖÖµäÐ͵ķ½·¨
l Java-To-ComµÄ·½Ê½£º
£¨£±£© jCom
£¨£²£© Jacob
l Ö±½ÓExcelÎļþ¶Áд
£¨£³£© jExcel
£¨£´£©&nbs ......
JavaỊ̈߳ºÏ̵߳ĵ÷¶È-ÐÝÃß
JavaÏ̵߳÷¶ÈÊÇJava¶àÏ̵߳ĺËÐÄ£¬Ö»ÓÐÁ¼ºÃµÄµ÷¶È£¬²ÅÄܳä·Ö·¢»ÓϵͳµÄÐÔÄÜ£¬Ìá¸ß³ÌÐòµÄÖ´ÐÐЧÂÊ¡£
ÕâÀïÒªÃ÷È·µÄÒ»µã£¬²»¹Ü³ÌÐòÔ±Ôõô±àдµ÷¶È£¬Ö»ÄÜ×î´óÏ޶ȵÄÓ°ÏìÏß³ÌÖ´ÐеĴÎÐò£¬¶ø²»ÄÜ×öµ½¾«×¼¿ØÖÆ¡£
Ïß³ÌÐÝÃßµÄÄ¿µÄÊÇʹÏß³ÌÈóöCPUµÄ×î¼òµ¥µÄ×ö·¨Ö®Ò»£¬Ïß³ÌÐÝÃß ......
JavaỊ̈߳ºÐÂÌØÕ÷-Óзµ»ØÖµµÄÏß³Ì
ÔÚJava5֮ǰ£¬Ïß³ÌÊÇûÓзµ»ØÖµµÄ£¬³£³£ÎªÁË“ÓД·µ»ØÖµ£¬ÆÆ·ÑÖÜÕÛ£¬¶øÇÒ´úÂëºÜ²»ºÃд¡£»òÕ߸ɴàÈƹýÕâµÀ¿²£¬×ß±ðµÄ·ÁË¡£
ÏÖÔÚJavaÖÕÓÚÓпɷµ»ØÖµµÄÈÎÎñ£¨Ò²¿ÉÒÔ½Ð×öỊ̈߳©ÁË¡£
¿É·µ»ØÖµµÄÈÎÎñ±ØÐëʵÏÖCallable½Ó¿Ú£¬ÀàËƵģ¬ÎÞ·µ»ØÖµµÄÈÎÎñ±ØÐëRu ......
JavaỊ̈߳ºÐÂÌØÕ÷-ÐźÅÁ¿
JavaµÄÐźÅÁ¿Êµ¼ÊÉÏÊÇÒ»¸ö¹¦ÄÜÍê±ÏµÄ¼ÆÊýÆ÷£¬¶Ô¿ØÖÆÒ»¶¨×ÊÔ´µÄÏû·ÑÓë»ØÊÕÓÐןÜÖØÒªµÄÒâÒ壬ÐźÅÁ¿³£³£ÓÃÓÚ¶àÏ̵߳ĴúÂëÖУ¬²¢Äܼà¿ØÓжàÉÙÊýÄ¿µÄÏ̵߳ȴý»ñÈ¡×ÊÔ´£¬²¢ÇÒͨ¹ýÐźÅÁ¿¿ÉÒÔµÃÖª¿ÉÓÃ×ÊÔ´µÄÊýÄ¿µÈµÈ£¬ÕâÀï×ÜÊÇÔÚÇ¿µ÷“ÊýÄ¿”¶þ×Ö£¬µ«²»ÄÜÖ¸³öÀ´ÓÐÄÄЩÔڵȴý£¬ÄÄЩ×ÊÔ ......