thread-holds-lock-pPortable Threadswith-lock-heldunschedule-functionGoTo Top

unschedule-function   name-or-scheduled-function &key verbose => boolean[Function]

Purpose
Cancel the upcoming invocation of a currently scheduled scheduled function.

Package   :portable-threads

Module   :portable-threads

Arguments and values

name-or-scheduled-function     An object (typically a string or a symbol) naming a currently scheduled scheduled function or a scheduled-function object
verbose     A generalized boolean (default is *schedule-function-verbose*)
boolean     A generalized boolean

Returns
The scheduled function if it was unscheduled; nil if the scheduled function was not currently scheduled or was not found.

Errors
Threads (multiprocessing) is not supported on the Common Lisp implementation.

Description
If the scheduled-function object is scheduled, it is removed from the list of currently scheduled scheduled functions.

See also
    *schedule-function-verbose*
    all-scheduled-functions
    make-scheduled-function
    schedule-function
    schedule-function-relative

Examples
Unschedule the quitting-time scheduled function:

  > (unschedule-function 'quitting-time)
  #<scheduled-function quitting-time [unscheduled]>
  >
Unschedule all currently scheduled scheduled functions:
  > (all-scheduled-functions)
  (#<scheduled-function nil [Jan 1, 2010 00:00:00]>)
  > (mapc #'unschedule-function (all-scheduled-functions))
  (#<scheduled-function nil [unscheduled]>)
  > (all-scheduled-functions)
  nil
  >
Unschedule a non-existent scheduled function:
  > (unschedule-function 'non-existent)
  ;; Warning: Scheduled-function non-existent was not scheduled; no action taken.
  nil
  >


The GBBopen Project


thread-holds-lock-pPortable Threadswith-lock-heldunschedule-functionGoTo Top