Bonjour,
Est-ce que quelqu'un saurait comment executer un thread du module threading (threading.Thread) plusieurs fois ?
Merci d'avance,
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 import threading as t class Msg(t.Thread): def __init__(self, msg): self.msg = msg def run(self): print(self.msg) # 1er appel bla = Msg("blabla !") bla.start() bla.join() # 2e appel bla.start() bla.join()
-anat3000
Partager