silc_schedule_set_global

SYNOPSIS

    void silc_schedule_set_global(SilcSchedule schedule);

DESCRIPTION

Sets global SilcSchedule `schedule' that can be retrieved at any time by using silc_schedule_get_global. The global scheduler is global only to the current thread. Each thread can have their own global scheduler. If each thread must have global scheduler this must be called in each thread. If the global scheduler has been set already, new call will replace the old one.

This routine is provided only as a convenience function to store program's or thread's scheduler in one global place. It is not mandatory to call this function in order to use SilcSchedule.

Many routines that require SilcSchedule as an argument will call silc_schedule_get_global if the scheduler is not provided to try to get global scheduler. Almost all routines in SilcSchedule API will call silc_schedule_get_global if the SilcSchedule is not provided as argument.