# costatements & waitfor(x) 's question

**URL:** <https://forums.digi.com/t/costatements-waitfor-x-s-question/10291>\
**Category:** Rabbit\
**Created:** [April 16, 2009, 2:57pm UTC](https://forums.digi.com/t/costatements-waitfor-x-s-question/10291 "2009-04-16T14:57:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![seulater](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@seulater](https://forums.digi.com/u/seulater)\
**Post date:** [April 16, 2009, 2:57pm UTC](https://forums.digi.com/t/costatements-waitfor-x-s-question/10291/1 "2009-04-16T14:57:48Z")

</div>

I know in other RTOS, which is what costatemnts are trying to mimic, that you have to place a delay in the task to release the RTOS can go to run another task. I don’t know if the same applies here using statements or not.

if i have 10 costatements and none of them have a “waitfor(DelayMs(x));” call in them will that screw things up. OR should i always have a “waitfor(DelayMs(x));” call in them to allow them to put some time into other costatements ?

---

<div class="post-metadata">

**Author:** ![kobuseng](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kobuseng](https://forums.digi.com/u/kobuseng)\
**Post date:** [April 17, 2009, 9:42am UTC](https://forums.digi.com/t/costatements-waitfor-x-s-question/10291/2 "2009-04-17T09:42:51Z")

</div>

You should have a yield in each costatement, that is essentially what a waitfor is.

So for your costatements that doesn’t have a waitfor, just place a yield somewhere where it is called regularly.

yield;
