Falko Schindler 1 year ago
parent
commit
e506a1e99b
1 changed files with 5 additions and 3 deletions
  1. 5 3
      website/documentation/content/section_action_events.py

+ 5 - 3
website/documentation/content/section_action_events.py

@@ -71,9 +71,11 @@ doc.intro(generic_events_documentation)
     NiceGUI provides a `cpu_bound` function for running CPU-bound tasks in a separate process.
     This is useful for long-running computations that would otherwise block the event loop and make the UI unresponsive.
     The function returns a future that can be awaited.
-    NOTE: The function needs to transfer the whole state of the passed function to the process (which is done with pickle).
-    It is encouraged to create static methods (or free functions) which get all the data as simple parameters (eg. no class/ui logic)
-    and return the result (instead of writing it in class properties or global variables).
+
+    **Note:**
+    The function needs to transfer the whole state of the passed function to the process, which is done with pickle.
+    It is encouraged to create free functions or static methods which get all the data as simple parameters (i.e. no class or UI logic)
+    and return the result, instead of writing it in class properties or global variables.
 ''')
 def cpu_bound_demo():
     import time