/* Constructor */
public AbstractPromise(final Map<Subscription, Observer<T>> observers) {
super(new Func1<Observer<T>, Subscription>() {
@Override
public Subscription call(Observer<T> observer) {
final rx.operators.AtomicObservableSubscription subscription = new AtomicObservableSubscription();
subscription.wrap(new Subscription() {
@Override
public void unsubscribe() {
// on unsubscribe remove it from the map of outbound observers
// to notify
observers.remove(subscription);