[armedbear-devel] CLOS thread safety

David Kirkman dkirkman at ucsd.edu
Sat Apr 24 19:38:44 UTC 2010

On Sat, Apr 24, 2010 at 11:43 AM, Tobias C. Rittweiler <tcr at freebits.de> wrote:
> David Kirkman <dkirkman at ucsd.edu> writes:
>> On Sat, Apr 24, 2010 at 9:44 AM, Tobias C. Rittweiler <tcr at freebits.de> wrote:
>>> There's a trick against the mangling. Use
>>>  (fresh-line)
>>>  (write-line (format nil <fmt-ctrl> . <fmt-args>))
>> That seems to have a much smaller but still non-vanishing
>> interaction cross section.  It's much better than just a plain
>> (format t ...), but it still occasionally mangles.
> I'm still on a uniprocessor system, so the above does it for me.  You
> should also add (FORCE-OUTPUT) after the WRITE-LINE that will further
> minimize the window for clobbering.
> (That's especially true in case you're using ABCL in combination with
> Slime. In that case, and it's not good enough, you could also hack
> SlimeOutputStream.java to make _writeLine() always involve
> _finishOutput().)

Yep, adding a (FORCE_OUTPUT) either makes the cross section zero,
or close enough for simple screen output.  And yes, I am using abcl
in combination with slime, and was kind of surprised at just how often
the threads were clobbering each others output.



More information about the armedbear-devel mailing list