Is there a way to make a function run "in the background" ?
like this:
myFunction(); //this will run til the app closes..
AnotherFuntion(); //while myFucntion is still running..
Hope you understand what i mean.
Is this possible?
Is there a way to make a function run "in the background" ?
like this:
myFunction(); //this will run til the app closes..
AnotherFuntion(); //while myFucntion is still running..
Hope you understand what i mean.
Is this possible?
Certainly.......you need to create a thread.....Look up some tutorials
Thanks...
When u say threads do u mean like this?
loop (indeed)
{
function();
{
anotherFunction();
}
}
nope......
In you example, the code in function() is executed before anotherfunction()............so anotherfunction() must wait for function() to complete before its executed........
With threads they execute at the same time.......
It's interesting problem, for example I want to have a timer running in background and another things..
I heard something about threads, but I don't know how to use them.. do you know where is some tutorial about that?