summaryrefslogtreecommitdiff
path: root/indra/llcommon/lleventcoro.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-07-04 19:58:03 -0400
committerNat Goodspeed <nat@lindenlab.com>2015-07-04 19:58:03 -0400
commit1d2514956f15f780aaead9bc123c1353a5b7fd20 (patch)
tree113814dce7ce62aa696d96f811e24cc0e6d7f04c /indra/llcommon/lleventcoro.h
parentd34476359e59a1902b1498fbed94daca3d20bff1 (diff)
MAINT-5357: Add llcoro::yield() function to yield for one frame.
Diffstat (limited to 'indra/llcommon/lleventcoro.h')
-rwxr-xr-xindra/llcommon/lleventcoro.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h
index f1c5dc2fde..e2ce4bb193 100755
--- a/indra/llcommon/lleventcoro.h
+++ b/indra/llcommon/lleventcoro.h
@@ -102,6 +102,13 @@ VoidListener<LISTENER> voidlistener(const LISTENER& listener)
}
/**
+ * Yield control from a coroutine for one "mainloop" tick. If your coroutine
+ * runs without suspending for nontrivial time, sprinkle in calls to this
+ * function to avoid stalling the rest of the viewer processing.
+ */
+void yield();
+
+/**
* Post specified LLSD event on the specified LLEventPump, then wait for a
* response on specified other LLEventPump. This is more than mere
* convenience: the difference between this function and the sequence