


The standard library thread package implements 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 package implements the Thread api.
The thread package source code is in src/lib/src/lib/thread-kit/src/core-thread-kit/thread.pkg.
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};
default_exception_handler : Ref((Exception -> Void) );
reset : Bool -> Void;
};


