Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
06e8f582
Commit
06e8f582
authored
Aug 12, 2015
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update doc with thread safety information
Bug: 474748
parent
393538fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
MQTTClient.h
src/MQTTClient.h
+6
-2
No files found.
src/MQTTClient.h
View file @
06e8f582
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
*
*
* Both libraries are designed to be sparing in the use of threads. So multiple client objects are
* Both libraries are designed to be sparing in the use of threads. So multiple client objects are
* handled by one or two threads, with a select call in Socket_getReadySocket(), used to determine
* handled by one or two threads, with a select call in Socket_getReadySocket(), used to determine
* when a socket has incoming data.
* when a socket has incoming data. MQTTClient is not safe to be called from multiple threads,
* whereas MQTTAsync is.
*
*
* @endcond
* @endcond
* @cond MQTTClient_main
* @cond MQTTClient_main
...
@@ -47,6 +48,7 @@
...
@@ -47,6 +48,7 @@
* totally asynchronous API where no calls block, which is especially suitable
* totally asynchronous API where no calls block, which is especially suitable
* for use in windowed environments, see the
* for use in windowed environments, see the
* <a href="../Casync/index.html">MQTT C Client Asynchronous API Documentation</a>.
* <a href="../Casync/index.html">MQTT C Client Asynchronous API Documentation</a>.
* The MQTTClient API is not thread safe, whereas the MQTTAsync API is.
*
*
* An MQTT client application connects to MQTT-capable servers.
* An MQTT client application connects to MQTT-capable servers.
* A typical client is responsible for collecting information from a telemetry
* A typical client is responsible for collecting information from a telemetry
...
@@ -936,7 +938,7 @@ DLLExport void MQTTClient_destroy(MQTTClient* handle);
...
@@ -936,7 +938,7 @@ DLLExport void MQTTClient_destroy(MQTTClient* handle);
* (see @ref qos) message has been successfully delivered, the application
* (see @ref qos) message has been successfully delivered, the application
* must call the MQTTClient_waitForCompletion() function. An example showing
* must call the MQTTClient_waitForCompletion() function. An example showing
* synchronous publication is shown in @ref pubsync. Receiving messages in
* synchronous publication is shown in @ref pubsync. Receiving messages in
* synchronous mode uses the MQTTClient_receive() function. Client applica
it
ons
* synchronous mode uses the MQTTClient_receive() function. Client applica
ti
ons
* must call either MQTTClient_receive() or MQTTClient_yield() relatively
* must call either MQTTClient_receive() or MQTTClient_yield() relatively
* frequently in order to allow processing of acknowledgements and the MQTT
* frequently in order to allow processing of acknowledgements and the MQTT
* "pings" that keep the network connection to the server alive.
* "pings" that keep the network connection to the server alive.
...
@@ -949,6 +951,8 @@ DLLExport void MQTTClient_destroy(MQTTClient* handle);
...
@@ -949,6 +951,8 @@ DLLExport void MQTTClient_destroy(MQTTClient* handle);
* application using callbacks registered with the library by the call to
* application using callbacks registered with the library by the call to
* MQTTClient_setCallbacks() (see MQTTClient_messageArrived(),
* MQTTClient_setCallbacks() (see MQTTClient_messageArrived(),
* MQTTClient_connectionLost() and MQTTClient_deliveryComplete()).
* MQTTClient_connectionLost() and MQTTClient_deliveryComplete()).
* This API is not thread safe however - it is not possible to call it from multiple
* threads without synchronization. You can use the MQTTAsync API for that.
*
*
* @page wildcard Subscription wildcards
* @page wildcard Subscription wildcards
* Every MQTT message includes a topic that classifies it. MQTT servers use
* Every MQTT message includes a topic that classifies it. MQTT servers use
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment