Client APIs
API Reference Overview
Execute DuckDB tasks on this thread.  
The thread will keep on executing tasks until either duckdb_finish_execution is called on the state,
max_tasks tasks have been executed or there are no more tasks to be executed.  
Multiple threads can share the same duckdb_task_state.  
###### Syntax {#docs:api:c:api::syntax}  
```c
idx_t duckdb_execute_n_tasks_state(
duckdb_task_state state,
idx_t max_tasks
);
```  
###### Parameters {#docs:api:c:api::parameters}  
* `state`: The task state of the executor
* `max_tasks`: The maximum amount of tasks to execute  
###### Return Value {#docs:api:c:api::return-value}  
The amount of tasks that have actually been executed  
<br>