Is there a way to pause functions WITHOUT pausing the whole entire functions, you know, ummm..... let me think.....I know, do a function but keep going while the function goes on. Is it possible?
Is there a way to pause functions WITHOUT pausing the whole entire functions, you know, ummm..... let me think.....I know, do a function but keep going while the function goes on. Is it possible?
Code:#if _emo #define stereo_type_i_dislike #endif
I meant:Is there a way to pause functions WITHOUT pausing the whole entire functions,
Is there a way to pause functions WITHOUT pausing the whole entire program?
Code:#if _emo #define stereo_type_i_dislike #endif
Are you familiar with multi-threaded programming? That's the only solution I could think of. At first I thought maybe you could just return from where you want to pause the execution of your function. But then there would be no way to re-execute the function without starting from the top of the function again. I'm not too familiar with multi-threaded programming, and giving some code wouldn't help too much since the implementation would probably be system-dependant (unless there is some kind of standard user-level threads package out there). In a nutshell I think you would have to execute your function as a separate thread (i believe you can do this with the "fork" system call in UNIX); then put it to sleep on a semaphore or something and have main() re-awaken it when you want it to, somehow.
>Is there a way to pause functions WITHOUT pausing the whole entire functions,
My first reactin was
Whoa... What the hell was that...
well, i think that maybe you could break/exit out of the function maybe after it reaches some value and after some time or after some other work gets accomplished you go back.
i dont know.. if this is what you want. try it that's all i can say.