摘要:        
服务器端:    阅读全文
        
            posted @ 2017-10-29 20:56
沧海一粒水
阅读(203)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
from urllib import requestimport gevent,timefrom gevent import monkeymonkey.patch_all() def f(url): print('GET: %s' % url) resp = request.urlopen(url)    阅读全文
        
            posted @ 2017-10-29 16:26
沧海一粒水
阅读(103)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
import geventdef f1(): print("print in f1") gevent.sleep(2) print("switch to foo again")def f2(): print("print in f2") gevent.sleep(1) print("switch t    阅读全文
        
            posted @ 2017-10-29 11:27
沧海一粒水
阅读(156)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
/var/log/message :系统日志信息 [root@xiesongyou log]# tail -1 messagesOct 25 09:18:46 xiesongyou dhclient[906]: bound to 192.168.154.129 -- renewal in 738 s    阅读全文
        
            posted @ 2017-10-29 11:13
沧海一粒水
阅读(137)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
from greenlet import greenletdef test1(): print("a") gr2.switch() print("b") gr2.switch()def test2(): print("c") gr1.switch() print("d") gr1 = greenle    阅读全文
        
            posted @ 2017-10-29 11:11
沧海一粒水
阅读(120)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
from multiprocessing import Process,Poolimport time,osdef Foo(i): time.sleep(2) print("in the Proess ",os.getpid()) return idef Bar(arg): print("-->ex    阅读全文
        
            posted @ 2017-10-29 09:00
沧海一粒水
阅读(1385)
评论(0)
推荐(0)
        
        
            
        
        
摘要:        
from multiprocessing import Process,Lockdef run_lock(l,i): l.acquire() print("Hello ",i) l.release()l=Lock()if __name__=="__main__": for i in range(10    阅读全文
        
            posted @ 2017-10-29 07:55
沧海一粒水
阅读(162)
评论(0)
推荐(0)
        
        
 
                    
                     
                    
                 
                    
                 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号