summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2023-05-17 00:00:45 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2023-05-17 01:52:39 +0200
commita6e43f71b6761c8b87efcb5d50d6fe1273c50f04 (patch)
tree9d351ef52a910cc75398259a66fcdce4101f75d6 /doc/classes
parenta8453cb3337c2e27c061a385f9c772cf670e38e0 (diff)
downloadredot-engine-a6e43f71b6761c8b87efcb5d50d6fe1273c50f04.tar.gz
Avoid multiple possibilites of deadlock in resource loading
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/WorkerThreadPool.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/classes/WorkerThreadPool.xml b/doc/classes/WorkerThreadPool.xml
index ace5f95506..136c6279d7 100644
--- a/doc/classes/WorkerThreadPool.xml
+++ b/doc/classes/WorkerThreadPool.xml
@@ -100,10 +100,13 @@
</description>
</method>
<method name="wait_for_task_completion">
- <return type="void" />
+ <return type="int" enum="Error" />
<param index="0" name="task_id" type="int" />
<description>
Pauses the thread that calls this method until the task with the given ID is completed.
+ Returns [constant @GlobalScope.OK] if the task could be successfully awaited.
+ Returns [constant @GlobalScope.ERR_INVALID_PARAMETER] if a task with the passed ID does not exist (maybe because it was already awaited and disposed of).
+ Returns [constant @GlobalScope.ERR_BUSY] if the call is made from another running task and, due to task scheduling, the task to await is at a lower level in the call stack and therefore can't progress. This is an advanced situation that should only matter when some tasks depend on others.
</description>
</method>
</methods>