Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
task_queue.h
Go to the documentation of this file.
1// Copyright 2026 The IREE Authors
2//
3// Licensed under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7#ifndef LOOMC_TASK_QUEUE_H_
8#define LOOMC_TASK_QUEUE_H_
9
10#include "loomc/task.h"
11#include "loomc/task_pool.h"
12
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
28
42 const loomc_task_pool_t* pool, loomc_allocator_t allocator,
43 loomc_task_queue_t** out_queue);
44
54
66
76
84
85#ifdef __cplusplus
86} // extern "C"
87#endif
88
89#endif // LOOMC_TASK_QUEUE_H_
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition base.h:34
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
Host allocator used for persistent Loom object storage.
Definition base.h:390
Borrowed destination for generic tasks.
Definition task.h:106
Generic caller-scheduled work.
Optional standard worker population for concurrent application work.
struct loomc_task_pool_t loomc_task_pool_t
Opaque standard task pool.
Definition task_pool.h:30
loomc_task_sink_t loomc_task_queue_sink(loomc_task_queue_t *queue)
Returns a borrowed generic task sink backed by queue.
void loomc_task_queue_free(loomc_task_queue_t *queue)
Drains, awaits, and frees queue.
loomc_status_t loomc_task_queue_allocate(const loomc_task_pool_t *pool, loomc_allocator_t allocator, loomc_task_queue_t **out_queue)
Allocates a task queue attached to pool.
loomc_status_t loomc_task_queue_await_shutdown(loomc_task_queue_t *queue)
Waits until every accepted task has drained and the queue process releases.
loomc_status_t loomc_task_queue_shutdown(loomc_task_queue_t *queue)
Stops accepting new tasks and begins draining accepted work.
struct loomc_task_queue_t loomc_task_queue_t
Opaque generic task queue.
Definition task_queue.h:27