PreviousUpNext

14.4.86  Threadkit

The standard library Threadkit api is the base of the multithreaded-programming api hierarchy.

The Threadkit api is implemented by the threadkit package.

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

The above information is manually maintained and may contain errors.

api {
    version : {date:String,  system:String, 
               version_id:List(Int )};
    banner : String;
    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 -> ?.internal_threadkit_types::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};
    Mailslot X;
    make_mailslot : Void -> Mailslot(X );
    same_mailslot : (Mailslot(X ) , Mailslot(X )) -> Bool;
    give : (Mailslot(X ) , X) -> Void;
    take : Mailslot(X ) -> X;
    give' : (Mailslot(X ) , X)
            -> ?.internal_threadkit_types::Mailop(Void );
    take' : Mailslot(X ) -> ?.internal_threadkit_types::Mailop(X );
    nonblocking_give : (Mailslot(X ) , X) -> Bool;
    nonblocking_take : Mailslot(X ) -> Null_Or(X );
    Maildrop X;
    exception MAY_NOT_FILL_ALREADY_FULL_MAILDROP;
    make_empty_maildrop : Void -> Maildrop(X );
    make_full_maildrop : X -> Maildrop(X );
    fill : (Maildrop(X ) , X) -> Void;
    empty : Maildrop(X ) -> X;
    empty' : Maildrop(X ) -> ?.internal_threadkit_types::Mailop(X );
    nonblocking_empty : Maildrop(X ) -> Null_Or(X );
    peek : Maildrop(X ) -> X;
    peek' : Maildrop(X ) -> ?.internal_threadkit_types::Mailop(X );
    nonblocking_peek : Maildrop(X ) -> Null_Or(X );
    swap : (Maildrop(X ) , X) -> X;
    swap' : (Maildrop(X ) , X)
            -> ?.internal_threadkit_types::Mailop(X );
    same_maildrop : (Maildrop(X ) , Maildrop(X )) -> Bool;
    Oneshot_Maildrop X;
    exception MAY_NOT_FILL_ALREADY_FULL_ONESHOT_MAILDROP;
    make_oneshot_maildrop : Void -> Oneshot_Maildrop(X );
    set : (Oneshot_Maildrop(X ) , X) -> Void;
    get : Oneshot_Maildrop(X ) -> X;
    get' : Oneshot_Maildrop(X )
           -> ?.internal_threadkit_types::Mailop(X );
    nonblocking_get : Oneshot_Maildrop(X ) -> Null_Or(X );
    same_oneshot_maildrop : (Oneshot_Maildrop(X ) , Oneshot_Maildrop(X )) -> Bool;
    Mailqueue X;
    make_mailqueue : Void -> Mailqueue(X );
    same_mailqueue : (Mailqueue(X ) , Mailqueue(X )) -> Bool;
    push : (Mailqueue(X ) , X) -> Void;
    pull : Mailqueue(X ) -> X;
    pull' : Mailqueue(X ) -> ?.internal_threadkit_types::Mailop(X );
    nonblocking_pull : Mailqueue(X ) -> Null_Or(X );
    Mailcaster X;
    Readqueue X;
    make_mailcaster : Void -> Mailcaster(X );
    make_readqueue : Mailcaster(X ) -> Readqueue(X );
    clone_readqueue : Readqueue(X ) -> Readqueue(X );
    receive : Readqueue(X ) -> X;
    receive' : Readqueue(X ) -> ?.internal_threadkit_types::Mailop(X );
    transmit : (Mailcaster(X ) , X) -> Void;
    Mailop X;
    never : Mailop(X );
    always_mailop : X -> Mailop(X );
    wrap_handler : (Mailop(X ) , (Exception -> X)) -> Mailop(X );
    wrap : (Mailop(X ) , (X -> Y)) -> Mailop(Y );
    ==> : (Mailop(X ) , (X -> Y)) -> Mailop(Y );
    guard : (Void -> Mailop(X )) -> Mailop(X );
    with_nack : (Mailop(Void ) -> Mailop(X )) -> Mailop(X );
    choose : List(Mailop(X ) ) -> Mailop(X );
    do_mailop : Mailop(X ) -> X;
    select : List(Mailop(X ) ) -> X;
    timeout_in' : time::Time -> ?.Mailop(Void );
    timeout_at' : time::Time -> ?.Mailop(Void );
    sleep_for : time::Time -> Void;
    sleep_until : time::Time -> Void;
    start_up_thread_scheduler : (Void -> Void) -> Int;
    start_up_thread_scheduler' : time::Time -> (Void -> Void) -> Int;
    thread_scheduler : (Void -> X) -> Void;
    thread_scheduler_is_running : Void -> Bool;
    shut_down_thread_scheduler : Int -> X;
    spawn_to_disk : (String , ((String , List(String )) -> Int)
                     , Null_Or(time::Time ))
                    -> Void;
    When 
      = APP_STARTUP | SHUTDOWN | STARTUP | THREADKIT_SHUTDOWN;
    at_all : List(When );
    note_startup_or_shutdown_action : (String , List(When ) , (When -> Void))
                                      -> Null_Or(((List(When ) , (When -> Void))) );
    forget_startup_or_shutdown_action : String
                                        -> Null_Or(((List(When ) , (When -> Void))) );
    exception NO_SUCH_ACTION;
    note_mailqueue : (String , mailqueue::Mailqueue(X )) -> Void;
    forget_mailqueue : String -> Void;
    note_mailslot : (String , ?.mailslot::Mailslot(X )) -> Void;
    forget_mailslot : String -> Void;
    note_imp : {at_shutdown:Void -> Void, 
                at_startup:Void -> Void,  name:String}
               -> Void;
    forget_imp : String -> Void;
    forget_all_mailslots_mailqueues_and_imps : Void -> Void;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext