PreviousUpNext

14.4.84  Thread_Scheduler

The standard library Thread_Scheduler api defines the scheduling queues and preemption mechanisms for Mythryl multithreaded programs.

The Thread_Scheduler api is implemented by the thread_scheduler package.

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

See also: Thread_Scheduler_Control api.

The above information is manually maintained and may contain errors.

api {    Thread ;
    foreground_run_queue : ?.internal_threadkit_types::Threadkit_Queue(
                             ((Thread , fate::Fate(Void ))) );
    get_current_thread : Void -> Thread;
    set_current_thread : Thread -> Void;
    enqueue_thread : (Thread , fate::Fate(Void )) -> Void;
    enqueue_and_switch_current_thread : (fate::Fate(Void ) , Thread) -> Void;
    enqueue_tmp_thread : (Void -> Void) -> Void;
    Thread_Scheduler_State 
      = MONO_THREAD | MULTI_THREAD | SIGNAL_PENDING;
    thread_scheduler_state : Ref(Thread_Scheduler_State );
    disable_thread_switching : Void -> Void;
    reenable_thread_switching : Void -> Void;
    reenable_thread_switching_and_dispatch_next_thread : Void -> X;
    dispatch_next_thread : Void -> X;
    reenable_thread_switching_and_switch_to_thread : (Thread , fate::Fate(X ) , X) -> Void;
    reenable_thread_switching_and_yield_to_next_thread : fate::Fate(Void ) -> X;
    scheduler_hook : Ref(fate::Fate(Void ) );
    pause_hook : Ref(fate::Fate(Void ) );
    shutdown_hook : Ref(fate::Fate(((Bool , Int)) ) );
    get_approximate_time : Void -> time::Time;
    reset_thread_scheduler : Bool -> Void;
    start_thread_scheduler_timer : time::Time -> Void;
    stop_thread_scheduler_timer : Void -> Void;
    restart_thread_scheduler_timer : Void -> Void;
    trace_backpatchfn : Ref(((Void -> String) -> Void) );
    Do_Echo  = {reply:String -> Void,  what:String};
    echo : Do_Echo -> Void;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext