Beispiel #1
0
 def run(self):
     print('Thread 1 start')
     wtf()
     print('Thread 1 end')
Beispiel #2
0
from threading import Thread
from wdb import set_trace as wtf


class Thread1(Thread):
    def run(self):
        print('Thread 1 start')
        wtf()
        print('Thread 1 end')


class Thread2(Thread):
    def run(self):
        print('Thread 2 start')
        wtf()
        print('Thread 2 end')

t1 = Thread1()
t2 = Thread2()
t1.daemon = t2.daemon = True
print('Starting threads')
t1.start()
t2.start()

print('Joining')
t1.join()
t2.join()

wtf()
print('The End')
Beispiel #3
0
 def run(self):
     print('Thread 2 start')
     wtf()
     print('Thread 2 end')
Beispiel #4
0
 def run(self):
     print('Process 1 start')
     wtf()
     print('Process 1 end')
Beispiel #5
0
from wdb import set_trace as wtf


class Process1(Process):
    def run(self):
        print('Process 1 start')
        wtf()
        print('Process 1 end')


class Process2(Process):
    def run(self):
        print('Process 2 start')
        wtf()
        print('Process 2 end')


t1 = Process1()
t2 = Process2()
t1.daemon = t2.daemon = True
print('Forking process')
t1.start()
t2.start()

print('Joining')
t1.join()
t2.join()

wtf()
print('The End')
Beispiel #6
0
 def run(self):
     print("Process 1 start")
     wtf()
     print("Process 1 end")
Beispiel #7
0
 def run(self):
     print('Thread 1 start')
     wtf()
     print('Thread 1 end')
Beispiel #8
0
 def run(self):
     print('Thread 2 start')
     wtf()
     print('Thread 2 end')