Plasma GitLab Archive
Projects Blog Knowledge

Class type Netplex_types.parallelizer


class type parallelizer = object .. end

method ptype : parallelization_type
method init : unit -> unit
Initializes the main process for usage with this parallelizer. This method must not be called outside the internal Netplex implementation!
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 ]
Returns the system-dependent thread identifier of the caller
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml