I have two functions that are called like within start():
SpawnIterator(this.Readkinect);
SpawnIterator(this.Explore);
The structures of these two functions are:
private IEnumerator<ITask>ReadKinect()
{
while(true)
{
----
yield return TimePort(1000).Receive();
}
}
public IEnumerator<ITask>Explore()
{
while(true)
{
----
yield return TimePort(1500).Receive();
}
}
I am trying to concurrently call two functions. But as I debugged, I noticed that ReadKinect() is calls first, some statements of its are executed, then Explore are called, next while statement of Explore() is called repeatedly, but control never goes to ReadKinect().
Pls suggest me where I made wrong.
Thank you