Here it is suggested to gracefully terminate a thread by sending it a notification of any kind. But how can I terminate a thread that is in a waiting state with K_FOREVER and that I know will never unblock, without using k_thread_abort()? An example of a thread to terminate could be the following:
void Foo_Thread( void )
{
fifo_ble_communication_item_t *fifoItem;
for ( ;; )
{
fifoItem = k_fifo_get( &fooFifo, K_FOREVER );
/* use fifoItem data */
}
}