V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
pppguest3962
V2EX  ›  Python

concurrent.futures 多进程/多线程之间,子程如何动态与主线协调变量数值?

  •  
  •   pppguest3962 · 2020-08-14 21:15:25 +08:00 · 1550 次点击
    这是一个创建于 1344 天前的主题,其中的信息可能已经有所发展或是发生改变。
    创建了 3 个 ProcessPoolExecutor,每个进程池里面的 task 都是分批次逐个提交的,task 起始进度不同,
    各个池里面所有的任务,需要在运行过程之中需要读取、修改主线创建的一个字典里面的键值对,
    是否能够实现?
    2 条回复    2020-08-15 02:47:18 +08:00
    jones2000
        2
    jones2000  
       2020-08-15 02:47:18 +08:00   ❤️ 1
    1.内存共享
    2.命名管道
    3.socket 通讯
    4.统一用数据库(mysql ,redis...) 读 /写获取
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   928 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:00 · PVG 04:00 · LAX 13:00 · JFK 16:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.