Pomeroy, Marty wrote:
>> BUT never can t1 and t2 both
access s1 or s2.
Practically speaking, a socket is a
stream of data, and it doesn't make sense for tasks to contend for that
stream.
Close, but not exactly. A socket is *two* streams of data, TX and RX. And even if I can't tell you an example, the simple possibility to use a socket like that can produce a requirement. Plus the close-while-another-thread-is-blocking case would sometimes be rather handy.
Don't get me wrong, I'm not fighting for this feature, nor will I implement it myself. But I can see why people want this. And if someone would provide a patch that is a no-op when not used (i.e. does not bloat the current code), I wouldn't hesitate to add it.
Simon