[concurrency-interest] question about j.u.c.Flow.Subscription

Michael McMahon michael.x.mcmahon at oracle.com
Mon Sep 14 12:03:11 EDT 2015


Hi,

I have a question about Flow subscribers and publishers.

Is it allowable for a j.u.c.Flow.Publisher to directly invoke a 
subscriber's methods
through its subscription object?

For example, can the implementation of Subscription.request(n)
call Subscriber.onNext() up to n times, before request() returns?

Considering that Subscriber.onNext() will often call Subscription.request()
you could easily get a recursive loop, but the question is whether
the spec allows it?

Thanks,
Michael.


More information about the Concurrency-interest mailing list