gray0 最近的时间轴更新
gray0

gray0

V2EX 第 681763 号会员,加入于 2024-03-25 09:40:55 +08:00
今日活跃度排名 2339
gray0 最近回复了
难蚌
🤡
23 天前
回复了 happydayandnight 创建的主题 投资 百万资金,旗开得胜
走吧老哥 现在还来得及 真的 收手吧
@functionABC 了解下神之天平这个游戏的制作 https://www.taptap.cn/moment/345859729911712518
愿赌服输
57 天前
回复了 gosky 创建的主题 Python Python asyncio 中怎么执行 cpu 密集型任务?
何必多 BB 直接上代码

from concurrent.futures import ProcessPoolExecutor
import asyncio

async def integration_process_and_gather():
with ProcessPoolExecutor() as process_pool:
loop = asyncio.get_running_loop()
numbers = [100000000, 1, 100, 10000, 1000000, 1000, 100000]
tasks = [
loop.run_in_executor(process_pool, do_count_number, n) for n in numbers
]
[print(type(task)) for task in tasks]
results = await asyncio.gather(*tasks)
print(f"integration_hello_world {results}")
62 天前
回复了 blueeon 创建的主题 奇思妙想 开一个失业者的咖啡馆怎么样?
想给房东装修队送钱就直说,不如送我
66 天前
回复了 yinshaojun96 创建的主题 程序员 Java 写腻了 想做点小东西 有什么推荐
@goodspb 博客赚不了钱. 三大项更是学生时代应该搞的东西(35 岁迫在眉睫,不应该这么悠闲),不如赌一把,哈哈
66 天前
回复了 yinshaojun96 创建的主题 程序员 Java 写腻了 想做点小东西 有什么推荐
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2416 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 15:51 · PVG 23:51 · LAX 08:51 · JFK 11:51
Developed with CodeLauncher
♥ Do have faith in what you're doing.