MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / processTask

Method processTask

lib/AsyncHttpClient/src/AsyncHttpClient.cpp:574–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572}
573
574void AsyncHttpClient::processTask(void* parameters)
575{
576 AsyncHttpClient* tthis = static_cast<AsyncHttpClient*>(parameters);
577
578 if ((nullptr != tthis) &&
579 (nullptr != tthis->m_processTaskSemaphore))
580 {
581 (void)xSemaphoreTake(tthis->m_processTaskSemaphore, portMAX_DELAY);
582
583 while (false == tthis->m_processTaskExit)
584 {
585 tthis->processCmdQueue();
586 tthis->processEvtQueue();
587
588 delay(PROCESS_TASK_PERIOD);
589 }
590
591 /* Ensure that any pending request/connection is aborted. */
592 tthis->abort();
593
594 /* The global mutex must be released from the same task it
595 * was taken, otherwise it will lead to a assertion in FreeRTOS.
596 */
597 tthis->giveGlobalMutex();
598
599 (void)xSemaphoreGive(tthis->m_processTaskSemaphore);
600 }
601
602 vTaskDelete(nullptr);
603}
604
605void AsyncHttpClient::processCmdQueue()
606{

Callers

nothing calls this directly

Calls 4

processCmdQueueMethod · 0.80
processEvtQueueMethod · 0.80
abortMethod · 0.80
giveGlobalMutexMethod · 0.80

Tested by

no test coverage detected