上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: 提供服务部分(运行时在接收端未打开前不能关闭) 1 #mainsec.py 2 from multiprocessing import Process, Queue 3 from multiprocessing.managers import BaseManager 4 class Worker(P... 阅读全文
posted @ 2015-07-02 00:34 何似王 阅读(888) 评论(0) 推荐(0) 编辑
摘要: 可以在windows下单机运行主部分(提供服务器)1 #mainfirst.py2 from multiprocessing.managers import BaseManager3 import Queue4 queue = Queue.Queue()5 class QueueManager(Ba... 阅读全文
posted @ 2015-07-02 00:31 何似王 阅读(3722) 评论(0) 推荐(0) 编辑
摘要: 1 register(typeid[, callable[, proxytype[, exposed[, method_to_typeid[, create_method]]]]]) 2 3 A classmethod which can be used for registering ... 阅读全文
posted @ 2015-07-01 22:55 何似王 阅读(2365) 评论(0) 推荐(0) 编辑
摘要: 1 from multiprocessing import Pool 2 import os 3 def f(x): 4 print "Os is%s"%os.getpid() 5 return x*x 6 if __name__ == '__main__': 7 pool... 阅读全文
posted @ 2015-07-01 18:03 何似王 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 官网文档的例子 1 from multiprocessing import Process, Value, Array 2 3 def f(n, a): 4 n.value = 3.1415927 5 for i in range(len(a)): 6 a[i] =... 阅读全文
posted @ 2015-07-01 10:03 何似王 阅读(2173) 评论(0) 推荐(0) 编辑
摘要: 1 #Lock.py 2 from multiprocessing import Process,Lock 3 import os 4 5 def f(l,i): 6 l.acquire() 7 print('hello world %d and Ospid is %s...' ... 阅读全文
posted @ 2015-07-01 08:55 何似王 阅读(1569) 评论(0) 推荐(0) 编辑
摘要: 1 from multiprocessing import Process,Queue,Pipe 2 import os 3 def f(q): 4 # q.send([42,None,'hello']) 5 print('This is child_conn ....' % q.r... 阅读全文
posted @ 2015-07-01 08:34 何似王 阅读(1533) 评论(0) 推荐(0) 编辑
摘要: 缅怀。对我个人比较影响的大师 阅读全文
posted @ 2015-05-25 08:26 何似王 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 以清华大学出版社《C++语言程序设计》 第四版,郑莉,董渊,何江舟 三位老师编著为蓝本。写这学习笔记,是为了自己清晰梳理C++。重粘代码也是为了方便更容易认清结构。 阅读全文
posted @ 2015-04-29 15:32 何似王 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 代码如下:#include #include using namespace std;typedef struct Tstudent //结构体完整定义{ int nId; float fGpa;}Tstudent;template //模版类class ... 阅读全文
posted @ 2015-04-29 15:22 何似王 阅读(184) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 下一页