AWS IoT Device SDK C: Task Pool
Task pool library
Return to main page ↑
IotTaskPool_CreateSystemTaskPool

Creates the one single instance of the system task pool.

This function should be called once by the application to initialize the one single instance of the system task pool. An application should initialize the system task pool early in the boot sequence, before initializing any other library that uses the system task pool, such as MQTT, Shadow, Defender, etc. An application should also initialize the system task pool before posting any jobs. Early initialization is typically easy to accomplish by creating the system task pool before the scheduler is started.

This function does not allocate memory to hold the task pool data structures and state, but it may allocate memory to hold the dependent entities and data structures, e.g. the threads of the task pool. The system task pool handle is recoverable for later use by calling IotTaskPool_GetSystemTaskPool or the shortcut IOT_SYSTEM_TASKPOOL.

Parameters
[in]pInfoA pointer to the task pool initialization data.
Returns
One of the following:
Warning
This function should be called only once. Calling this function more that once will result in undefined behavior.