#!/usr/bin/python3
#coding: utf-8
from websocket import create_connection
import gzip
import time
import json
import redis
from multiprocessing import Pool
def getdata(currsname):
print(currsname)
if __name__ == '__main__':
p = Pool(5)
currnames = ['ethusdt', 'btcusdt', 'bchusdt', 'eosusdt', 'ltcusdt']
for i in currnames:
p.apply_async(getdata, args=(i,))
print('进程' + i + '启动成功!')
p.close()
p.join()
Python windows linux 多进程
最新推荐文章于 2024-06-30 14:23:28 发布