×î¼òµ¥µÄ python ¶àÏß³ÌʾÀý
import time,thread
def test(a,b):
for i in range(a,b):
time.sleep(1)
print i
def start():
thread.start_new_thread(test,(1,1001))
thread.start_new_thread(test,(1000,2001))
if __name__=='__main__':
start()
Ïà¹ØÎĵµ£º
¡¡¡¡Python±ê׼ģ¿éÖУ¬Óжà¸öÄ£¿éÓÃÓÚÊý¾ÝµÄѹËõÓë½âѹËõ£¬Èçzipfile£¬gzip, bz2µÈµÈ¡£ÉϴνéÉÜÁËzipfileÄ£¿é£¬½ñÌì¾ÍÀ´½²½²zlibÄ£¿é¡£ zlib.compress(string[, level]) zlib.decompress(string[, wbits[, bufsize]]) ¡¡¡¡zlib.compressÓÃÓÚѹËõÁ÷Êý¾Ý¡£²ÎÊýstringÖ¸¶¨ÁËҪѹËõµÄÊý¾ÝÁ÷£¬²ÎÊýlevelÖ¸¶¨ÁËѹËõµÄ¼¶±ð£¬ËüµÄÈ ......
ÎÒÃǾ³£»á²ÉÓÃÉú²úÕß/Ïû·ÑÕß¹ØÏµµÄÁ½¸öÏß³ÌÀ´´¦ÀíÒ»¸ö¹²Ïí»º³åÇøµÄÊý¾Ý¡£ÀýÈçÒ»¸öÉú²úÕßÏ߳̽ÓÊÜÓû§Êý¾Ý·ÅÈëÒ»¸ö¹²Ïí»º³åÇøÀµÈ´ýÒ»¸öÏû·ÑÕßÏ̶߳ÔÊý¾ÝÈ¡³ö´¦Àí¡£µ«ÊÇÈç¹û»º³åÇøµÄ̫С¶øÉú²úÕߺÍÏû·ÑÕßÁ½¸öÒì²½Ï̵߳ÄËٶȲ»Í¬Ê±£¬ÈÝÒ׳öÏÖÒ»¸öÏ̵߳ȴýÁíÒ»¸öÇé¿ö¡£ÎªÁ˾¡¿ÉÄܵÄËõ¶Ì¹²Ïí×ÊÔ´²¢ÒÔÏàͬËٶȹ¤×÷µÄ¸÷Ï̵߳ĵ ......
·¢
Ïֺܶ๫˾ҪÇóÕÆÎÕһÎű¾ÓïÑÔ£¬Ò»Ö±Ò²Ïë¸ã¸ãÕâ¸ö£¬¿´C++£¬Linux
C±à³ÌÒ²Ö»ÊÇΪÁ˶Ôϵͳ¸ü¼ÓµÄÁ˽⣬°¦£¬ÎҵŤ×÷¶¨Î»ºÃÏñÒ»Ö±¶¼²»ÔõôÃ÷È·£¬ÊÇÒª¸ã¸ö×Ô¼º×îÉó¤µÄÁË£¬ÒÔºóÓÐʱ¼äÔÙ¸ãlinuxC£¬ÕÒ¹¤×÷µÚһλ¡£¡£¡£¹¤
×÷»ù±¾¶¨Î»ÔÚ Java+python£¬´ó²¿·Ö¹«Ë¾Ò²²»»áÒªÇóÒ»¸öÈ˼È×öJavaÒ²×öC++¡£ÔÙ˵ÕâÓïÑÔÒ²ÊÇ´ ......