class type parallelizer =object
..end
method ptype : parallelization_type
method init : unit -> unit
method start_thread : (par_thread -> unit) ->
Unix.file_descr list ->
string -> logger -> par_thread
start_thread f l name logger
: Starts a new thread or process and calls
f thread
in that context. The list of file descriptors l
is ensured
to be shared with the main process.
There is no way to check when the thread terminates.
It is allowed that the par_thread
object passed to f
is a different
object as the returned par_thread
object.
method create_mem_mutex : unit -> (unit -> unit) * (unit -> unit)
let lock, unlock = par#create_mem_locker()
: Creates a mutex that
is sufficient to protect process memory from uncoordinated access.
The function lock
obtains the lock, and unlock
releases it.method current_sys_id : [ `Process of int | `Thread of int ]