232k views
20 votes
How to use multi processing with a class in python.

User Latka
by
5.0k points

1 Answer

5 votes

Answer:

from multiprocessing import Process def display(): print ('Hi !! I am Python') if __name__ == '__main__': p = Process(target=display) p.start() p.join() In this example, at first we import the Process class then initiate Process object with the display () function.

Step-by-step explanation:

User Nicoletta
by
5.6k points