class type mtprovider =object..end
method single_threaded : boolWhether this is a single-threaded program. In this case, a number of methods change their meaning, as described below.
method create_thread : 's 't. ('s -> 't) -> 's -> threadIn a multi-threaded program: Starts a new thread, and calls the
passed function with the passed argument in the new thread
(like Thread.create).
In a single-threaded program: fails.
method self : threadIn a multi-threaded program: Returns the currently running thread.
Subsequent calls of self can return different objects for the
same thread, but the id method will always return the same number.
In a single-threaded program: Returns a dummy object (see below).
method yield : unit -> unitIn a multi-threaded program: gives a hint that another thread should better run now. In a single-threaded program: this is a no-op.
method create_mutex : unit -> mutexIn a multi-threaded program: Creates a mutex and returns the object. In a single-threaded program: Returns a dummy mutex object (see below).
method create_condition : unit -> conditionIn a multi-threaded program: Creates a condition variable and returns the object. In a single-threaded program: Returns a dummy variable (see below).