Why there aren't a single functions to query whether a queue is empty/full?

Hi!

Ok, bad example as I couldn’t explain myself. My mistake. Let’s come back to the question, why this code doesn’t work:

void producer_task( void* pvParameters )
{
   int data = 10;

   while( 1 )
   {
      vTaskDelay( pdMS_TO_TICKS( 500 ) );

      while( uxQueueSpacesAvailable( g_queue_handler ) > 0 ){ // Program gets stucked here, why?

         // EDIT: Program never comes here:
         if( xQueueSend( g_queue_handler, (void*) &data, pdMS_TO_TICKS( 100 ) ) == pdFALSE ) {

            Serial.print( "TO(W): " );
         }

         data += 10;

         vTaskDelay( pdMS_TO_TICKS( 10 ) );
      }
   }
}

There was a guy (here) that pointed this problem out years ago, and his question was never answered.

Greetings :slight_smile:!