Multiprocessing

I have written the same code but on proc.start() the showSquare function is not being called. Can you tell me what is the problem

Hey @Codecracaker532, can you please share your code so that I can have a look at it ?

Thanks ! :slight_smile:

Here is the code:


It is showing the ouput 4 in coding blocks ide but not showing the time delay produced by the for loop. Also when I run the same code in anaconda it gives only Hello as output

Hey @Codecracaker532, I am attaching the screenshot of outputs(on CB IDE as well as Jupyter Notebook) I am getting on running the exact code you gave. Please have a look :

So I guess this is the exact output you are looking for ?

but it is not working in anaconda when i tried. Here is the picture of the output

Please try to run it in a single cell. Most importantly, the order of execution matters a lot over here. You can also observe in the video how sir was also not able to print the output at the first go. So try to restart your kernel and then run the cells in the correct order !

I hope this helps !
Happy Learning ! :slight_smile:

i tried it in tha same block but it is giving the same output. Also have tried the code many times by restarting the kernal but still it is not working.

Hey, please have a look at this doubt. I had resolved this doubt earlier too. See if your code matches with the code in the following doubt :

multiprocessing

I hope this helps ! :+1:
Happy Learning ! :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.