Example #1
0
 def run(self):
     print('Thread 1 start')
     wtf()
     print('Thread 1 end')
Example #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')
Example #3
0
 def run(self):
     print('Thread 2 start')
     wtf()
     print('Thread 2 end')
Example #4
0
 def run(self):
     print('Process 1 start')
     wtf()
     print('Process 1 end')
Example #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')
Example #6
0
 def run(self):
     print("Process 1 start")
     wtf()
     print("Process 1 end")
Example #7
0
 def run(self):
     print('Thread 1 start')
     wtf()
     print('Thread 1 end')
Example #8
0
 def run(self):
     print('Thread 2 start')
     wtf()
     print('Thread 2 end')