interdependents have indicated they're blocking to check. Otherwise the unit running before the
last BlockingUnit can post to the presents invoker and those newly posted units will be skipped.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6006 542714f4-19e9-0310-aa3c-eee0fc999fb1
- PresentsInvoker decides it's empty
- It waits on other dependencies
- During the wait, something (probably from one of the other dependencies) posts to the PresentsInvoker
- We loop back around, the dependencies are empty
- We end early, with the posted bit still to be done...
So... after waiting, do a quick check for emptyness and if not satisfied, start the whole dern cycle over.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6005 542714f4-19e9-0310-aa3c-eee0fc999fb1
NamedSetAdapter on autopilot; there you have multiple things that you might not want
to bother with, but here you damned well BETTER implement that one method yourself.
Also, while I'm at it, make that protected since I really doubt you're going to find
yourself sitting on top of an EntryAddedEvent that you're REALLY SURE is the right
one & want to pass it in to one of these by hand. And if you do, suck it up and let
the string compare burn the couple extra cycles to make sure. (I feel like making
the same change to the other Named* things here real quick, but I should really
double check that I don't break anybody's stuff/change anything I see using it that
would now be making the named versions more visible for now good reason)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6004 542714f4-19e9-0310-aa3c-eee0fc999fb1
listen for ElementUpdatedEvents on specific bits on dobjs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6003 542714f4-19e9-0310-aa3c-eee0fc999fb1
actually reduce latency, but wouldn't it be cool if it did?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5985 542714f4-19e9-0310-aa3c-eee0fc999fb1
The purpose is to
- Ensure type checking for "fail-fast" detection of streaming errors.
- But simplify it so that callers don't have to cast themselves and
potentially screw up by using "String(obj)" or "Array(obj)", or miss out
on the fail-fastyness by using "obj as SomeType".
- But, at the same time, allow for the sveltest code possible.
// first one is a bit shorter!
_name = ins.readObject(Name);
_name = Name(ins.readObject());
// first one is a bit shorter!
_state = ins.readObject(String);
_state = ins.readObject() as String;
So, to sum up: the code is the shortest and doesn't require special-casing
if you are reading a String, Number, int, uint, Boolean, or Array.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5984 542714f4-19e9-0310-aa3c-eee0fc999fb1
Lately I'm trying to do things more "actionscripty", and so we just
use the "natural" iteration on an object (either 'for' or 'for each').
Plus, we never use these Iterators anywhere except in presents-based code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5983 542714f4-19e9-0310-aa3c-eee0fc999fb1
an anonymous extension of DefaultMap and any other creation is better done
through the static factory methods, so don't present the user with a pointless
choice.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5982 542714f4-19e9-0310-aa3c-eee0fc999fb1
injected handling by subclasses.
I had a nice version of this that allowed user controlled handling for any signal to be injected.
Unfortunately it used multibindings from guice, and I'm loathe to add a dependency to narya just for
that.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5980 542714f4-19e9-0310-aa3c-eee0fc999fb1
simply a function from K to V. Sorry to break users but I know you're few and
being able to integrate with all the excellent Google Collections functional
stuff is a juicy reward for a little egg breaking.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5976 542714f4-19e9-0310-aa3c-eee0fc999fb1
* Apparently, a couple of whitespace cleanups my gvim did awhile ago while I was looking around in
here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5971 542714f4-19e9-0310-aa3c-eee0fc999fb1
Unless I have to roll this back because the like compiler in CS3
shits its pants trying to understand it (external references for
default parameter values seem to sometimes fail).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5969 542714f4-19e9-0310-aa3c-eee0fc999fb1
Note that we're using ints instead of units for offset/length.
Does anyone really need a byte array larger than 2^31?
And if so, wouldn't you then also be within sight of busting 2^32?
Why not make it a Number and support up to 2^53?
Number is no guarantee of a desire for a floating-point value in
the flash libraries, see Graphics.lineStyle()'s first parameter.
Actionscript, you fail for not having long.
And... I said I wasn't going to bitch at Adobe/Macromedia any more
but this is a total FAIL.
0 is a valid length. Everyone knows this.
Can you imagine if they picked a different constant?
length: the number of bytes to read, unless it's 9, in which case
it reads *all* the bytes. Your code should check to see if you're
about to read 9 bytes, and instead read 8 in one go and then
a follow-on byte.
uint.MAX_VALUE would have made tons more sense.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5968 542714f4-19e9-0310-aa3c-eee0fc999fb1
the Array length is 0, so let's make sure we don't cause any
streaming errors here.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5966 542714f4-19e9-0310-aa3c-eee0fc999fb1
getting that adds the default value to the map. I opted for fetch() which at
least means something close to get() and can be documented as also inserting
the default value. I also considered obtain() and acquire() but those both felt
like they had something to do with locks. apply() seemed too functional.
wangle() seemed like a strong contender for a while.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5965 542714f4-19e9-0310-aa3c-eee0fc999fb1
streaming to our java server, so let's just make them streamable directly.
Does away with the need for custom Streamers.
Also made them Hashable, in case we read a StreamableHashMap containing
Integers as keys, for example.
Less code is better code.
(Why was BooleanStreamer added the other day? langBoolean was already Streamable
and was already in Translations)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5960 542714f4-19e9-0310-aa3c-eee0fc999fb1
Use String concatination in others (it's faster in actionscript than in Java)
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5959 542714f4-19e9-0310-aa3c-eee0fc999fb1