From f30522dc14be81a79928125f892f7220e2f22b58 Mon Sep 17 00:00:00 2001 From: William Robinson Date: Tue, 16 Oct 2007 19:05:30 +0100 Subject: [PATCH] Added multi-threading example. --- examples/mthello.lisp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/mthello.lisp diff --git a/examples/mthello.lisp b/examples/mthello.lisp new file mode 100644 index 0000000..af51d69 --- /dev/null +++ b/examples/mthello.lisp @@ -0,0 +1,12 @@ +(require '#:asdf) +(asdf:oos 'asdf:load-op '#:cl-glfw) + +(cffi:defcallback hello-fun :void ((arg :pointer)) + (format t "Hello ")) + +(glfw:init) +(let ((thread (glfw:create-thread (cffi:callback hello-fun) (cffi:null-pointer)))) + (glfw:wait-thread thread glfw:+wait+) + (format t "world~%")) + +(glfw:terminate) -- 2.11.4.GIT