Module In_thread.When_finished
When_finished describes how In_thread.run f behaves when the helper thread finishes f ().
type t=
val all : t listval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val default : t Core.refdefaultdefines the default value used forIn_thread.run's?when_finishedargument. Changes todefaultaffect subsequent calls toIn_thread.run. Initially,default = Try_to_take_the_async_lock, which typically leads to better latency by avoiding an extra context switch to pass the result to the Async scheduler thread. However, there are applications (e.g. jenga) whereNotify_the_schedulerleads to significantly higher throughput by greatly decreasing the total number of Async cycles.