Module In_thread.Helper_thread
type tA Helper_thread is a thread that is dedicated to handling computations external to Async. We need them because some libraries (e.g. Sqlite3) require that certain collections of computations run in the same thread.
val create : ?priority:Priority.t -> ?name:string -> unit -> t Async_kernel.Deferred.tcreate ?name ()creates a new helper thread. Thenamewill be used as the thread name for any work that that is done by the thread that doesn't get its own name.createuses a thread from Async's thread pool, reserving that thread for exclusive use by the helper thread until the helper thread is no longer used (specifically, finalized and is finished with all its work), at which point the thread is made available for general use by the pool.createreturns a deferred that becomes determined when a helper thread is available. On the other hand,create_nowchecks if a helper thread is available now, and if so returns it, or else returnsError.
val create_now : ?priority:Priority.t -> ?name:string -> unit -> t Core.Or_error.t