From: <ra...@ra...> - 2010-10-27 21:52:00
|
Quoting Nikodemus Siivola <nik...@ra...>: > On 27 October 2010 18:38, <ra...@ra...> wrote: > As Dimitry noted, this isn't currently supported at all on SBCL on > any platform. I must have missed that in his notes. Just to be completely clear, even on the platforms that support threaded SBCL this isn't guaranteed to work? > A complete solution would be to provide a way to do this -- basically > creating sufficient context for the lisp thread in the callback. Not > impossible, but a bit tricky. And yet, it fits the definition I have of threading :) (or at least one of them). > An easier workaround might be to have a C-side callback that sends a > request to a Lisp thread to do the work and waits for the results. Sure, it's easy enough to write yet-another wrapper. But I am trying to write multi-platform Lisp. And part of that definition ( :) again) is that I shouldn't have to write those platform-specific wrappers for C libraries that are already multi-platform. I guess that the way I see it is that the Lisp and the C are running in the same image, and so execution on a thread should be able to go from one to the other. Might be too much to ask for, at least as present. Thanks for the reply. At least now, I can stop banging my head against that particular wall. Neil Gilmore ra...@ra... |
From: Daniel H. <dhe...@te...> - 2010-10-28 00:37:02
|
On Wed, 27 Oct 2010, ra...@ra... wrote: > Quoting Nikodemus Siivola <nik...@ra...>: >> On 27 October 2010 18:38, <ra...@ra...> wrote: >> As Dimitry noted, this isn't currently supported at all on SBCL on >> any platform. > > I must have missed that in his notes. Just to be completely clear, even > on the platforms that support threaded SBCL this isn't guaranteed to > work? In particular, the SBCL garbage collector likes to "stop the world" before proceeding. It then scans the stack for each thread to find root objects. If there is a thread it doesn't know about... - Daniel |
From: Nikodemus S. <nik...@ra...> - 2010-10-28 06:33:55
|
On 28 October 2010 00:51, <ra...@ra...> wrote: > I must have missed that in his notes. Just to be completely clear, > even on the platforms that support threaded SBCL this isn't > guaranteed to work? (I was referring to his reply, not patch notes.) Not just "isn't guaranteed to work", but "expected not to work at all" -- not on any platform. I'm honestly surprised you managed to make it ever work at all. Cheers, -- Nikodemus |