Related project: sbcl-win32-threads

September 16, 2010

For some time I wasn’t making much progress with cl-gtk2 (though I have plans to improve it) because I’ve been busy with adding native threads support for SBCL on Windows that are necessary for developing cross-platform GUI applications with SBCL and cl-gtk2. Threads are pretty much working right now and I’m now asking to test and evaluate it. The sources are available at http://github.com/dmitryvk/sbcl-win32-threads and the binary installer is available at https://sites.google.com/site/dmitryvksite/sbcl-distr/sbcl-1.0.40-threads-2.msi.

There are still some I/O issues waiting to be resolved that affect threads (Win32 is quite weird when it comes to I/O). Lucky for me, Anton Kovalenko made improvements in SBCL’s I/O for Win32.

cl-gtk2 seems to work in multithreaded SBCL on Windows (though I didn’t test it a lot). There is an issue that affects cl-gtk2: loading it from the SLIME REPL hangs during initialization of Gtk+ due to some deadlock in windows’ C runtime – you’ll just have to enter anything in SLIME’s *inferior-lisp* buffer to unhang it. Hopefully, this will be resolved with help from Anton Kovalenko.

11 Responses to “Related project: sbcl-win32-threads”

  1. aerique Says:

    Thanks for working on this Dmitry!

  2. Wow, that’s amazing! You are doing great work, Dimitry. Keep it up (-:

  3. Matthew Swank Says:

    I have been following this branch for a while, and for the past month or so, all the contribs fail when I build it under cygwin. What is your build environment like?

    • I’m building under cygwin and I haven’t paid too much attention to contribs failing (they fail on my machine). But the failure seems to be I/O-related, since just running “echo 1 | sh run-sbcl.sh” crashes SBCL.

  4. Neil Says:

    First off, thanks for the work.

    It’s not helping my current problem, though, which involves callbacks made from somewhere other than the primary thread from a DLL loaded through CFFI.

    I haven’t tried to debug through it or anything yet.

  5. mahmud Says:


    Which CL does it work with on Win32? What version?

    I really would kill for some form of GUI toolkit, preferably Gtk.

    Thanks in advance.

  6. Gabriel Tudor Says:


    I’m trying to use cl-gtk2-gtk but I have some questions about how to debug gui code and how do you usually work with it. I think there is a good way of using it and a bad way and I’m using it badly.

    Currently my code looks like:

    (defun run ()
    (let ((builder (make-instance ‘builder)))
    (builder-add-from-file builder (namestring (make-pathname :name “furseby”
    :type “glade”
    :directory ‘(:relative “gui”))))
    ; match the controls that matter to vars
    (let ((window (builder-get-object builder “window”))
    (search-field (builder-get-object builder “search-field”))
    ; on window close keep the gtk running. helps with debugging
    (g-signal-connect search-field “key-press-event” (lambda (x y) (format t “~a” (list w y))))
    (g-signal-connect window “destroy” (lambda(w) (declare (ignore w)) (leave-gtk-main)))
    (widget-show window)))))

    and every time I have an error, the gui window (which I get by calling run) hangs and doesn’t respond to futher repl commands like (leave-gtk-main).

    Is there a forum, chat room or any other place where I can ask this questions?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: