Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
MTBL_THREADPOOL(3)					      MTBL_THREADPOOL(3)

NAME
     mtbl_threadpool - create a shared worker threadpool

SYNOPSIS
     #include <mtbl.h>

     struct mtbl_threadpool *
     mtbl_threadpool_init(size_t thread_count);

     void
     mtbl_threadpool_destroy(struct mtbl_threadpool **pool);

DESCRIPTION
     Certain  MTBL  "option"  structures  accept an mtbl_threadpool option (e.g.
     mtbl_writer_options, mtbl_sorter_options) to enable  internal  concurrency.
     The  user-provided mtbl_threadpool object must be initialized before use by
     calling mtbl_threadpool_init(), and must be destroyed after use by  calling
     mtbl_threadpool_destroy().

     If  the thread_count parameter to mtbl_threadpool_init() is 0, multithread-
     ing will be disabled. Regardless, a non-NULL mtbl_threadpool object will be
     returned from mtbl_threadpool_init().

   Threadpool options
     thread_count

	 The maximum number of worker threads that the threadpool will open.

RETURN VALUE
     mtbl_threadpool_init() returns NULL on failure, and non-NULL on success.

				   07/10/2024		      MTBL_THREADPOOL(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mtbl_threadpool&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help