瀏覽代碼

Document what is unsafe in WorkQueue work functions.

Lasse Öörni 12 年之前
父節點
當前提交
00cf05c2a2
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      Docs/Reference.dox

+ 8 - 1
Docs/Reference.dox

@@ -1704,7 +1704,14 @@ The thread index ranges from 0 to n, where 0 represents the main thread and n is
 
 Multithreading is so far not exposed to scripts, and is currently used only in a limited manner: to speed up the preparation of rendering views, including lit object and shadow caster queries, occlusion tests and particle system, animation and skinning updates. Raycasts into the Octree are also threaded, but physics raycasts are not.
 
-Note that as the Profiler currently manages only a single hierarchy tree, profiling blocks may only appear in main thread code, not in the work functions.
+When making your own work functions, observe that the following things are (at least currently) unsafe and will result in undefined behavior and crashes, if done outside the main thread:
+
+- Sending events
+- Using profiler blocks
+- Modifying scene or UI content
+- Modifying GPU resources
+- Requesting resources from ResourceCache
+- Executing script functions
 
 \page Tools Tools