Re: [dylan] Stream locking (was: Method combinations as a design pattern for locking)

Bruce Mitchener <[email protected]> Thu, 19 Dec 2013 15:52:04 +0700
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <CA+esKjOPtetwj5_2tf_LytkVnzDCdpAoLpk-a+hz6Gu_-REaJQ@mail.gmail.com>
I've updated my branch after a couple of comments from housel.

I've also updated it to remove 2 more instances of with-stream-locked (one
in format(), one in print()). It also now includes documentation for
lock-stream, unlock-stream and with-stream-locked which were previously
undocumented.

I re-did a 3 stage bootstrap today without problems. After that, I re-ran
the test from bug 4004 from 1998. I noticed an interesting change.
Yesterday, when I ran it, the behavior was somewhat chaotic in that each
thread would print out some varying number of lines before the switch to
the other thread. Today, they interleave perfectly fine, printing one item
from each one thread and then the other.  That seems like a pretty good
improvement to me in the threading behavior.

Also, at the prompting of housel, I've sealed the lock-stream and
unlock-stream generic functions on a couple of classes where that was
possible to help eliminate some dispatch overhead where possible. This was
the case for <byte-string-stream>, <unicode-string-stream> and
<simple-wrapper-stream>.

Thanks to everyone who's helped this come together and provided
encouragement. This is looking like a good set of changes and improvements.

 - Bruce

_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers