documentation update

This commit is contained in:
Peterino2 2026-09-19 15:34:37 -07:00
parent d24b46f883
commit 4c7c96a8a9
1 changed files with 11 additions and 0 deletions

View File

@ -218,6 +218,17 @@ enum {
* no tag and produces no completion. Private native IDs are never reused.
* Cancellation is best effort; an operation already committed may succeed.
* Closing a session early abandons undelivered results and drains internal work.
*
* Component lifetime pattern: the application assigns dedicated tags to reusable
* components (for example, a clipboard tag passed to a UI backend at init).
* All components share the session's tag namespace; use separate tags for requests
* that may overlap. Keep each tag assigned to its component while it is alive.
* If a component is destroyed with a request pending, its owner must consume or
* ignore the eventual REQUEST_DONE before assigning that tag to a replacement.
* Cancelling the request does not release the tag or remove its completion.
* This prevents a replacement component from consuming its predecessor's result.
* Result payloads are borrowed until the next valid next_frame call or close;
* copy data or retain retainable references before keeping them beyond that point.
*/
typedef struct uhdk_event uhdk_event;
typedef struct uhdk_event_list {