Multiprocessing

I am getting no output in my jupyter notebook with the same code as shown in the above video.
when tried the same on VS code I am getting error with following message:

An attempt has been made to start a new process before the current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

i am using windows OS.

Hey @shubhrs25_01611cd3f0e6aa02 ,
Had seen such kind of error first time here…

The suspected reason for this error may be that VS code doesn’t support multiprocessing.
means , that on running VS code, it itself runs as a process on windows , hence you can’t create sub processes over it.

Would recommend to use native jupyter notebook , there it uses the cores available in your windows , hence there you can try this.

I hope this helps
Thank You and Happy learning :slight_smile:.

as i mentioned, when i use jupyter for the same there is no output after the thread.start() method. Also when used if name == "main ", code ran in vs code but the output sequence was always same, unlike an asynchrnous operation.

for this did you tried running the complete code in a single cell.

this toh i explained above.

The most common reason is the use of processors by the windows OS , its not that you will get what you want from windows , it depends on the currently running tasks in the background , so to just test it , you can any free online server and test there once.
You can try google colab also, i guess it will work there.

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.