[armedbear-devel] CLOS thread safety

Tobias C. Rittweiler tcr at freebits.de
Sat Apr 24 18:43:45 UTC 2010


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().)

  -T.





More information about the armedbear-devel mailing list