How to run a function until another gets finished ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to run a function until another gets finished ?

I have two functions spinner() and sleep_5() I want to run the spinner untill sleep_5() is executing and then after completion of sleep_5() I want to stop the spinner() also I am getting error..! here is my attempt : https://code.sololearn.com/cuTZ1X2Z3XTF/?ref=app

26th May 2021, 8:04 PM
Ratnapal Shende
Ratnapal Shende - avatar
1 Answer
+ 1
It's giving you Assertion Error. You can only check clips process and sleep_5 is not child process of spinner. Sleep_5 is not related to spinner. Child process of spinner will be a process which will run under it's function
30th May 2021, 7:26 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar