class PubSub {

    public void unsubscribeMain(@NonNull Subscriber<T> sub) {
        synchronized (mainSubs) {
            if (!mainSubs.remove(sub)) {
                Log.e(TAG, "Unexpected main listener unsubscribed");
            }
        }
    }

}