Вот минимальный код:
Код: Выделить всё
from turtle import *
import threading
from itertools import permutations
from random import choice
import concurrent.futures
screen=Screen()
def star_multiple(turtle):
# repeatedly calls draw star function
def pen(foo):
# a convenient tool to do all penup/pendown
def drawstar(turtle,l,colors):
# draws a star of edge=l param.
a,b,c,d=Turtle(),Turtle(),Turtle(),Turtle()
pen('penup')
a.goto(-500,200)# the turtle go to their position(works)
b.goto(500,200)
c.goto(-500,-200)
d.goto(500,-200)
pen('pendown')
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as executor:
executor.map(star_multiple,[a,b,c,d])# This doesn't work,
done()

вывод, который я получаю

Подробнее здесь: https://stackoverflow.com/questions/655 ... -in-python