Skip to content

Commit bb1e9f9

Browse files
doc: kernel: serivces: threads: warn unsafe sys work queue use
Add warning to workqueue docs, explaining that using the system work queue for blocking work can not be done safely. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 56f7dc4 commit bb1e9f9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/kernel/services/threads/workqueue.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ operations that are potentially blocking (e.g. taking a semaphore) must be
103103
used with care, since the workqueue cannot process subsequent work items in
104104
its queue until the handler function finishes executing.
105105

106+
.. warning::
107+
108+
The system workqueue can not safely be used to perform operations which are
109+
potentially blocking, as there is no guarantee that work items submitted to
110+
it do not depend on subsequent work items in the queue to unblock them.
111+
106112
The single argument that is passed to a handler function can be ignored if it
107113
is not required. If the handler function requires additional information about
108114
the work it is to perform, the work item can be embedded in a larger data

0 commit comments

Comments
 (0)