# Module OUnitRunner.GenericWorker

    module GenericWorker: sig .. end

Build worker based runner.

    type message_to_worker =

`|` | `Exit`
`|` | `AckLock of `bool``
`|` | `RunTest of `OUnitTest.path``

    val string_of_message_to_worker : message_to_worker -> string

    type message_from_worker =

`|` | `AckExit`
`|` | `Log of `OUnitTest.log_event_t``
`|` | `Lock of `int``
`|` | `Unlock of `int``
`|` | `TestDone of `(OUnitTest.result_full * OUnitTest.result_list)``

    val string_of_message_from_worker : message_from_worker -> string

    module MapPath: Map.Make(sig
    type t = OUnitTest.path

    val compare : 'a list -> 'a list -> intend)

    type ('a, 'b) channel = {

`` | `send_data : `'a -> unit`;`
`` | `receive_data : `unit -> 'b`;`
`` | `close : `unit -> unit`;`

}

    val wrap_channel : string ->
           ('a -> string) ->
           ('b -> string) ->
           ('b, 'a) channel ->
           ('b, 'a) channel

    val main_worker_loop : OUnitConf.conf ->
           (unit -> 'a) ->
           (message_from_worker,
            message_to_worker)
           channel ->
           string ->
           (OUnitTest.path * 'b * (OUnitTest.ctxt -> 'c))
           MapPath.t -> bool -> unit

    type 'a worker = {

`` | `channel : `(message_to_worker, message_from_worker) channel`;`
`` | `close_worker : `unit -> string option`;`
`` | `select_fd : `'a`;`
`` | `shard_id : `string`;`
`` | `is_running : `unit -> bool`;`

}

    val runner : (OUnitConf.conf ->
            (MapPath.key * OUnitTest.test_length *
             OUnitTest.test_fun)
            MapPath.t ->
            string -> string -> bool -> 'a worker) ->
           ('a worker list ->
            float -> 'a worker list) ->
           OUnitConf.conf ->
           (OUnitTest.path, OUnitTest.result) OUnitLogger.logger ->
           OUnitChooser.chooser ->
           (OUnitTest.path * OUnitTest.test_length * OUnitTest.test_fun) list ->
           OUnitTest.result_full list