-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
LOWNot important, nor necessary. Probably a QoL improvement.Not important, nor necessary. Probably a QoL improvement.
Description
Low: Document Callback Threading Behavior
Priority: LOW
Type: Documentation
Location
Various callback invocations throughout libwsv5.c
Issue
The threading behavior of callbacks is not clearly documented. Specifically:
-
Which thread calls the callback?
- Event callbacks are called from background
event_thread - State callbacks are called from whichever thread changes state
- Log callbacks can be called from any thread
- Event callbacks are called from background
-
Can callbacks call back into the library?
- Yes, but not clearly documented
- Mutexes are released before callbacks (good design)
- But users don't know this is safe
-
Should callbacks block?
- No, but not documented
- Blocking callback would stall event processing
Impact
- Users don't know if callbacks are thread-safe
- Users might avoid calling library functions from callbacks unnecessarily
- Users might cause deadlocks by blocking in callbacks
Metadata
Metadata
Assignees
Labels
LOWNot important, nor necessary. Probably a QoL improvement.Not important, nor necessary. Probably a QoL improvement.