• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






farion

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2018年11月14日

python学习笔记(54) 多进程实现socket sever并发
摘要: import socketfrom multiprocessing import Processdef serve(conn): while True: ret = '你好'.encode('utf-8') conn.send(ret) msg = conn.recv(1024).decode('u 阅读全文
posted @ 2018-11-14 16:30 farion 阅读(228) 评论(0) 推荐(0)
 
python学习笔记(53) 面向对象开启多线程
摘要: 进程与进程之间数据是隔离的from multiprocessing import Processimport osclass MyProcess(Process): def __init__(self,args1,args2): super().__init__() self.args1 = arg 阅读全文
posted @ 2018-11-14 10:26 farion 阅读(599) 评论(0) 推荐(0)