Problems
- deref on some IDerefs can block.
- futures
- promises
- problem - If you can't accept blocking indefinitely you have no alternative
- some reference type might not yet have a value
- futures
- promises
- delays
- problem - if you need to make a decision based upon whether or not such a reference has a value you can't, without forcing/blocking
Possible solutions
- categorize references that can block
- e.g. IMightBlock
- offer a deref with timeout
- e.g. (deref blocking-ref timeout timeout-val)
- categorize references that might not yet have a value
- e.g. IMightNotHaveAValue
- offer a query fn for that
- (has-value? aref)
Issues
- which (if any) of these make sense for other refs?
- timeout seems really confusing for non-blocking
- has-value? could be trivially true for other refs
- but causes paranoia?
...
Wants
- I want to know if a potentially blocking deref has a value
future-done?for Future(.hasValue foo)for Promise
...