Skip to content

Instantly share code, notes, and snippets.

@priyadarshan
Forked from fukamachi/libevent-pthreads.lisp
Last active August 29, 2015 14:27
Show Gist options
  • Save priyadarshan/d6a9d155fb5d40a68795 to your computer and use it in GitHub Desktop.
Save priyadarshan/d6a9d155fb5d40a68795 to your computer and use it in GitHub Desktop.
(cffi:define-foreign-library libevent2-pthreads
(:darwin (:or
"libevent_pthreads.dylib"
; brew's install of libevent on Mac OX X
"/usr/local/lib/libevent_pthreads.dylib"
; macports
"/opt/local/lib/libevent_pthreads.dylib"))
(:unix (:or "/usr/local/lib/event2/libevent_pthreads.so"
"libevent_pthreads.so"
"libevent_pthreads-2.0.so.5"
"/usr/lib/libevent_pthreads.so"
"/usr/local/lib/libevent_pthreads.so"))
(t (:default "libevent_pthreads")))
#+unix
(cffi:use-foreign-library libevent2-pthreads)
(as:enable-threading-support)
;; as:with-event-loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment