doc: Added C++ std::jthread limitation

This commit is contained in:
Jakob Hasse
2023-05-04 17:26:40 +08:00
parent 77f8aa2317
commit bb9912cc57
2 changed files with 8 additions and 2 deletions

View File

@@ -18,8 +18,6 @@ esp-idf-cxx Component
`esp-idf-cxx <https://github.com/espressif/esp-idf-cxx>`_ component provides higher-level C++ APIs for some of the ESP-IDF features. This component is available from the `IDF Component Registry <https://components.espressif.com/components/espressif/esp-idf-cxx>`_.
.. _cplusplus_multithreading:
C++ language standard
---------------------
@@ -34,6 +32,8 @@ To compile the source code of a certain component using a different language sta
Use ``PUBLIC`` instead of ``PRIVATE`` if the public header files of the component also need to be compiled with the same language standard.
.. _cplusplus_multithreading:
Multithreading
--------------
@@ -41,6 +41,10 @@ C++ threads, mutexes, and condition variables are supported. C++ threads are bui
See :example:`cxx/pthread` for an example of creating threads in C++.
.. note::
The destructor of `std::jthread <https://en.cppreference.com/w/cpp/thread/jthread>`_ can only safely be called from a task that has been created by :ref:`the IDF implementation of pthread_create() <posix_thread_api>` or by the `C++ threading library API <https://en.cppreference.com/w/cpp/thread>`_.
.. _cplusplus_exceptions:
Exception handling