cl-async-future

API Reference

cl-async-future

A futures implementation for Common Lisp. Plugs in nicely to cl-async.

CL-ASYNC-FUTURE

  • Class FUTURE  (PROMISE)
    PRESERVE-CALLBACKS   Accessor: PROMISE-PRESERVE-CALLBACKS
    When nil (the default) detaches callbacks after running promise.
    REATTACH-CALLBACKS   Accessor: PROMISE-REATTACH-CALLBACKS
    When a promise's callback returns another promise, bind all callbacks from this promise onto the returned one. Allows values to transparently be derived from many layers deep of promises, almost like a real call stack.
  • Function MAKE-FUTURE (&key preserve-callbacks (reattach-callbacks t))
    Create a blank future.
  • Macro FUTURE-HANDLER-CASE (body-form &rest error-forms &environment env)
    Wrap all of our lovely attach macro up with an event handler. This is more or less restricted to the form it's run in. Note that we only have to wrap (attach) because *all other syntax macros* use attach. This greatly simplifies our code. Note that if we just wrap `attach` directly in a macrolet, it expands infinitely (probably no what we want). So we're doing some trickery here. We use the environment from the top-level macro to grab the original macro function and make it available from *within* the macrolet. This allows the macrolet to redefine the `attach` macro while also simultaneously expanding the previous definition of it. This allows wrapped calls of future-handler-case to add layers of error handling around any `attach` call that is within lexical grasp.

Also exports

  • BLACKBIRD-SYNTAX:ALET
  • BLACKBIRD-SYNTAX:WALK
  • BLACKBIRD-BASE:ATTACH
  • BLACKBIRD-UTIL:ADOLIST
  • BLACKBIRD-UTIL:CHAIN
  • BLACKBIRD-SYNTAX:ALET*
  • BLACKBIRD-BASE:ATTACH-ERRBACK
  • BLACKBIRD-SYNTAX:AIF
  • BLACKBIRD-BASE:CREATE-PROMISE
  • BLACKBIRD-SYNTAX:MULTIPLE-PROMISE-BIND
  • BLACKBIRD-UTIL:ALL
  • BLACKBIRD-UTIL:AREDUCE
  • BLACKBIRD-BASE:*DEBUG-ON-ERROR*
  • BLACKBIRD-BASE:*PROMISE-KEEP-SPECIALS*
  • BLACKBIRD-UTIL:AMAP
  • BLACKBIRD-SYNTAX:WALK1
  • BLACKBIRD-BASE:PROMISE
  • BLACKBIRD-BASE:FINISH
  • BLACKBIRD-BASE:PROMISE-FINISHED-P
  • BLACKBIRD-SYNTAX:WAIT
  • BLACKBIRD-BASE:PROMISIFY
  • BLACKBIRD-BASE:CATCHER
  • BLACKBIRD-BASE:*PROMISE-FINISH-HOOK*
  • BLACKBIRD-BASE:FINALLY
  • BLACKBIRD-BASE:WITH-PROMISE
  • BLACKBIRD-UTIL:AEACH
  • BLACKBIRD-BASE:TAP
  • BLACKBIRD-UTIL:AFILTER
  • BLACKBIRD-BASE:PROMISEP
  • BLACKBIRD-BASE:SIGNAL-ERROR