Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
环境python3.8
Pyarmor 9.0.7
pyarmor g src -O dist38
code
from cmath import inf, nan
import pandas as pd
import numpy as np
import os
from joblib import Parallel, delayed
from random import sample
import sys
import glob
import re
import random
import json
import time
def plot(pallNum):
def func(i):
while(True):
print(i)
time.sleep(3)
return(i)
Parallel(n_jobs=pallNum)(delayed(func)(i) for i in range(1,10))
if name == 'main':
tips:
#替换成这行无报错
Parallel(n_jobs=pallNum, backend = "threading")(delayed(func)(i) for i in range(1,10))
无报错 正常运行
raise self._exception
_pickle.PicklingError: Could not pickle the task to send it to the workers.
在多线程环境中,可以运行,在多进程环境中不能执行,pyarmor 目前支持多进程么
Beta Was this translation helpful? Give feedback.
All reactions