IPending is not the way to check if a value can be dereferenced. It is an interface for the function isRealized, which is used to check if a given potentially-lazy sequence has been "realized" aka exhausted and fully consumed.
The desired interface is IDeref, which is checked in clojure.core/deref and which all of the deref'able data structures (atom, delay, etc) implement. (Futures can be deref'd because of the additional check in clojure.core/deref.)
IPending
is not the way to check if a value can be dereferenced. It is an interface for the functionisRealized
, which is used to check if a given potentially-lazy sequence has been "realized" aka exhausted and fully consumed.The desired interface is
IDeref
, which is checked inclojure.core/deref
and which all of the deref'able data structures (atom, delay, etc) implement. (Futures can be deref'd because of the additional check inclojure.core/deref
.)Closes #161.