MCPcopy Create free account
hub / github.com/apache/arrow / garrow_thread_pool_new

Function garrow_thread_pool_new

c_glib/arrow-glib/executor.cpp:126–138  ·  view source on GitHub ↗

* garrow_thread_pool_new: * @n_threads: The number of threads in the pool. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable): A newly created #GArrowThreadPool on success, * %NULL on error. * * Since: 23.0.0 */

Source from the content-addressed store, hash-verified

124 * Since: 23.0.0
125 */
126GArrowThreadPool *
127garrow_thread_pool_new(guint n_threads, GError **error)
128{
129 auto arrow_thread_pool_result = arrow::internal::ThreadPool::Make(n_threads);
130 if (garrow::check(error, arrow_thread_pool_result, "[thread-pool][new]")) {
131 auto arrow_thread_pool = *arrow_thread_pool_result;
132 auto thread_pool = GARROW_THREAD_POOL(
133 g_object_new(GARROW_TYPE_THREAD_POOL, "executor", &arrow_thread_pool, nullptr));
134 return thread_pool;
135 } else {
136 return nullptr;
137 }
138}
139
140G_END_DECLS
141

Callers

nothing calls this directly

Calls 2

checkFunction · 0.70
MakeFunction · 0.50

Tested by

no test coverage detected