summaryrefslogtreecommitdiffstats
path: root/src/coroutine.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-03-23 13:45:35 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2010-03-26 13:05:03 +0100
commit80d39f61c92d81fc8408c5d3a9b67f2b2f9d082a (patch)
treef7ebfada3d27ff29416f2a8a34e28b7e649ae87b /src/coroutine.cpp
parent1141c3477a7565287ad7a221b87df9410fcc4c44 (diff)
Add notes about the 'root' coroutine in the docs.
Diffstat (limited to 'src/coroutine.cpp')
-rw-r--r--src/coroutine.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/coroutine.cpp b/src/coroutine.cpp
index cfb2ce3..27050d1 100644
--- a/src/coroutine.cpp
+++ b/src/coroutine.cpp
@@ -144,7 +144,10 @@ void Coroutine::setStack(void *memory, int size)
static QThreadStorage<Coroutine **> qt_currentCoroutine;
/*!
- Returns the currently running Coroutine.
+ Returns the currently running Coroutine for the active thread.
+
+ This function will return a unique Coroutine instance that is in the
+ Running state for the initial 'coroutine' of a thread.
*/
Coroutine *Coroutine::currentCoroutine()
{
@@ -196,6 +199,10 @@ bool Coroutine::cont()
/*!
Stops the currently running coroutine and passes control back to the caller of cont().
+ It is an error to call this function if the currently running coroutine is
+ the 'root' coroutine of a thread - it does not have a caller that it could pass
+ control to.
+
\sa cont()
*/
void Coroutine::yield()