<div class="gmail_quote">On Thu, Jan 28, 2010 at 12:46 AM, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:andrei@erdani.com">andrei@erdani.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm done with basic messaging and entering the shared qualifier. I've reshuffled a fair amount of text, so you can expect new/improved material starting around section 4.5, "Exchanging Messages Between Threads".<br>
<br>
I'm looking for a good example of a class for explaining shared and synchronized. Right now I use Date, but I'm hoping for something more challenging that contains an indirection. Any ideas, please let me know. Thanks!<br>
<br>
The file is here:<br>
<br>
<a href="http://erdani.com/d/fragment.preview.pdf" target="_blank">http://erdani.com/d/fragment.preview.pdf</a><br>
<br>
<br>
Andrei<br>
</blockquote><div> </div>Maybe an "environment" object that contains handles to system resources like database handles, streams for writing to a printer, open files (like log files) or sockets to other processes. The idea that a handle to a database or printer is something you want to share should make sense to people but leave you room to build something instructive.<br>
<br>Kevin<br><br></div>