Bill Sommerfeld writes:
> meem pointed out that this code may well be copied by someone as an
> example of how to do multi-threaded programming, and as such, neither
> practice (falling off the end of main without reaping your threads, or
> passing a pointer into your stack to another thread) is really something
> which we'd like to see copied.

I see.  In that case, I'd suggest moving the line outside of main()
(somewhere near the top of the file where other statics go), and
adding a comment saying that the threads reference this data, so we
can't just pass them a pointer to something on main()'s stack.

Otherwise, I don't think it serves its intended educational function.
It's just another obscure "now why did they do that?" blip in the
source base.

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org

Reply via email to