From 056add6ac54c8c7b187818272ae1206aac79b5ee Mon Sep 17 00:00:00 2001 From: Steve Kim Date: Tue, 1 Aug 2023 13:31:47 -0700 Subject: [PATCH] add note to FAQ about blocking in callbacks --- documents/FAQ.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/documents/FAQ.md b/documents/FAQ.md index 081020178..a150e94b5 100644 --- a/documents/FAQ.md +++ b/documents/FAQ.md @@ -65,6 +65,10 @@ cmake -DCMAKE_INSTALL_PREFIX="" -DCMAKE_PR cmake --build . --target install ``` +### I am experiencing deadlocks + +You MUST NOT perform blocking operations on any callback, or you will cause a deadlock. For example: in the on_publish_received callback, do not send a publish, and then wait for the future to complete within the callback. The Client cannot do work until your callback returns, so the thread will be stuck. + ### Mac-Only TLS Behavior Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.7.3, when a stored private key from the Keychain is used, the following will be logged at the "info" log level: @@ -73,7 +77,7 @@ Please note that on Mac, once a private key is used with a certificate, that cer static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided. ``` -### How do debug in VSCode? +### How do debug in VSCode? Here is an example launch.json file to run the pubsub sample ``` json @@ -111,14 +115,14 @@ Here is an example launch.json file to run the pubsub sample * Device certificate * Intermediate device certificate that is used to generate the key below * When using samples it can look like this: `--cert abcde12345-certificate.pem.crt` - * Key files + * Key files * You should have generated/downloaded private and public keys that will be used to verify that communications are coming from you * When using samples you only need the private key and it will look like this: `--key abcde12345-private.pem.key` ### I still have more questions about the this sdk? * [Here](https://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html) are the AWS IoT Core docs for more details about IoT Core -* [Here](https://docs.aws.amazon.com/greengrass/v2/developerguide/what-is-iot-greengrass.html) are the AWS IoT Greengrass v2 docs for more details about greengrass +* [Here](https://docs.aws.amazon.com/greengrass/v2/developerguide/what-is-iot-greengrass.html) are the AWS IoT Greengrass v2 docs for more details about greengrass * [Discussion](https://github.com/aws/aws-iot-device-sdk-cpp-v2/discussions) questions are also a great way to ask other questions about this sdk. * [Open an issue](https://github.com/aws/aws-iot-device-sdk-cpp-v2/issues) if you find a bug or have a feature request * [Breif MQTT CONCEPT](./MQTT_CONCEPT.md)