Upgrading to v0.6.x
cl-async has swapped out its backend library from libevent to libuv. For more information on why, see the related post.
The goal of the v0.6.x upgrade was to port cl-async over to libuv with the least amount of API changes as possible.
cl-async v0.6.x is built against libuv-1.0.0-rc2. This means you must use cl-async with libuv >= v1.0.0-rc2 or it will not work.
Note that we’re only listing breaking changes here.
with-event-loopno longer have
logger-cbkeywords. Both features have been completely removed.
watch-fdis gone and has been replaced with pollers.
init-tcp-socketno longer takes an
fdkeyword. The concept of wrapping a cl-async socket around an existing fd no longer exists. Instead use the new poller object, which allows you to fire a callback whenever an fd can be read from/written to (although it does not provide an abstraction for writing to an fd which is no longer supported).
disable-socketare no longer implemented and will throw errors if used. libuv doesn’t have the concept of disabling reading/writing on a socket, and I’m not sure if this was ever that useful to begin with. If your app relies heavily on this feature, it can most likely be built back into cl-async (just open an issue).
cl-async still has threading support, but it is now extremely simplified. Be sure to familiarize yourself with notifiers, which are the new threading abstraction.
enable-threading-supportis gone and has no replacement. Threading support is always on now.
with-threading-contextis gone and has no replacement. You can no longer add or change events to an event loop from another thread (but see notifiers).
I may have missed some breaking changes or explained some things wrong. If you are having a problem getting your app running on cl-async v0.6.x, please let me know by opening a github issue and venting your frustrations. I’m here to help!