[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Java threads and ComsTime
I was just putting together a posting about Sun's Piped I/O Streams and
how channels can be implemented *much* better ... when Andy popped up
with the stuff by his student Gerald Hilderink.
I've not digested that code yet ... I compiled it and it ran quite a
bit quicker than my offering ... even though it seems to have several
busy-loops ... ahh ... it may be that continuous (i.e. non-sleeping)
busy-loops are better than passive blocking in Java ... *if* you are
confident the block will be removed pretty quick (and that is the case
in ComsTime) *and* you have a high-latency blocking primitive (and that's
almost certainly the case with the Java wait/notify or suspend/resume
methods) ... sigh ...
Anyway, I'm still posting my stuff ... about 24K bytes plain text, so
get ready to discard if you don't want it. There's a lot of text plus
some Java. The text gives my understanding of Java's thread semantics.
This may be horribly wrong ...