Hello guys. I have a very big question for you...i can't find any solution.
Let's say that i have this code:
So it is an infinite loop. The question is:
It is possible to stop the function while it is executing without using any other logical var like
I'm thinking at something like stop(*check) or...i don't know. I was wondering... if i could keep into a pointer the adress of that check() call it would be possible that by changing its value with null i mean *ptr=null to stop the function?
Why i need it? I'm doing a sockets listening function so i need to stop the
} through an another Stop function
Conclusion: I don't want to use a logical variable to stop the function while it is executing. I want to close it at any time with another function... It would be possible?
Thank you and sorry for my poor English!