PreviousUpNext

14.4.82  Thread

The standard library Thread api defines basic thread functionality for multithreaded Mythryl programs. (Mythryl threads are lightweight userspace constructs not to be confused with posix threads, which are uniformly termed “pthreads” in Mythryl documents.)

The Thread api is implemented by the thread package.

The Thread api source code is in src/lib/src/lib/thread-kit/src/core-thread-kit/thread.api.

The above information is manually maintained and may contain errors.

api {    exception THREAD_SCHEDULER_NOT_RUNNING;
    Thread ;
    get_current_thread : Void -> Thread;
    get_current_thread's_name : Void -> String;
    get_current_thread's_id : Void -> Int;
    same_thread : (Thread , Thread) -> Bool;
    compare_thread : (Thread , Thread) -> Order;
    hash_thread : Thread -> Unt;
    thread_to_string : Thread -> String;
    thread_to_name : Thread -> String;
    make_thread : String -> (Void -> Void) -> Thread;
    make_thread' : String -> (X -> Void) -> X -> Thread;
    thread_done : Void -> X;
    thread_death_mailop : Thread -> Mailop(Void );
    yield : Void -> Void;
    make_per_thread_property : (Void -> X)
                               -> {clear:Void -> Void,  get:Void -> X, 
                                   peek:Void -> Null_Or(X ),  set:X -> Void};
    make_boolean_per_thread_property : Void -> {get:Void -> Bool,  set:Bool -> Void};
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext