cl-async

Idlers

An idler is an object that tells the event loop to call its callback once per loop. This means your callback will be fired for each loop of the event loop (including when the loop has events to process…don’t be fooled into thinking it will only be called when the loop is idle!)

idler

This class wraps an idler, which fires your callback once per loop of the event loop.

It is an opaque object meant to be passed to free-idler.

idler-freed-p
(defmethod idler-freed-p ((idler idler)))
  => t/nil

This method lets us know if an idler has already been freed.

idle

(defun idle (callback &key event-cb))
  => idler

Starts calling the callback once per loop.

You can optionally pass an :event-cb function, called when errors occur while running.

free-idler

(defun free-idler (idler))
  => nil

Stops the given idler and frees its resources.