How to run a function until another gets finished ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Resposta
+ 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