From 421107b4b7f58a902069b1b8238e8b7c2fe1a9db Mon Sep 17 00:00:00 2001 From: Jon Shallow Date: Mon, 7 Sep 2026 15:42:10 +0100 Subject: [PATCH] Resource: Caution about setting up resources in thread-safe manner --- man/coap_resource.txt.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man/coap_resource.txt.in b/man/coap_resource.txt.in index ad8900bf..bd4b994f 100644 --- a/man/coap_resource.txt.in +++ b/man/coap_resource.txt.in @@ -311,6 +311,10 @@ As the _uri_path_ of the resource has to be unique across all of the resources associated with a _context_, *coap_add_resource*() will delete any previous _resource_ with the same _uri_path_ before adding in the new _resource_. +*NOTE:* *coap_add_resource*() should only be called after the rest of the +resource has been set up (handlers, observable, attributes etc.) in case another +thread starts to use the resource. + *Function: coap_delete_resource()* The *coap_delete_resource*() function deletes the resource identified by