* =str #22880 fix mapAsync racy failure handling
* =str #22881 test also resume case for throwing mid-stream mapAsync
* address review feedback, the handle calls must be exactly like that
* fail fast in mapAsync for completed failed future, #21318
* the callback was not run until todo == parallelism or the sync
event limit was reached, and that can be a problem if upstream
stages are slow (noticed this for a blocking Kafka producer stage)
* skip callback for completed futures
* fix callback allocation
main work by @drewhk with contributions from @2m and @rkuhn
This work uncovered many well-hidden bugs in existing Stages, in
particular StatefulStage. These were hidden by the behavior of
OneBoundedInterpreter that normally behaves more orderly than it
guarantees in general, especially with respect to the timeliness of
delivery of upstream termination signals; the bugs were then that
internal state was not flushed when onComplete arrived “too early”.
* found one bug of too early actor stop and thereby missing cancel of upstream,
in fan-in tests ""work with one immediately failed and one nonempty publisher"
Changed rules:
* 1.9 Always onSubscribe prior to any other signals
* 1.9 NullPointerException if subscriber is null
* 3.17 Long overflow, effectively unbounded instead of onError
Fixed some more things:
* fixed some FIXME
* Long drop and take
* memory leaks in tck tests, use BeforeClass to create ActorSystem
use AfterClass to shutdown ActorSystem
* more tck tests
* don't emit OnComplete when substream is cancelled
* work around for memory leak in PrefixAndTail
* add supervion for stages and built in ops run by interpreter
* add supervision for mapAsync and mapAsyncUnordered
* add supervision to groupBy and splitWhen
* reference doc for scala and java
* FlowMaterializer is now the actor independent interface
* ActorFlowMaterializer is the actor based interface
* MaterializerSettings renamed to ActorFlowMaterializerSettings
* impl.ActorBasedFlowMaterializer renamed to impl.ActorFlowMaterializerImpl
* Optimizations included in ActorFlowMaterializerSettings
* Note that http is using FlowMaterializer in api, but I suspect that it
will currently only run with a ActorFlowMaterializer