Comments (1)
@eyalfa This is expected behavior.
The semantics of stream finalizers are that the last finalizers of a stream are deferred to its scope. So when you use stream.ensuring(promise.succeed(())
the finalizer is deferred to the scope of stream
.
Furthermore, the semantics of merge
are that finalizers that are part of the scopes of the left
and right
streams become part of the scope of the merged stream. This is necessary for stream.merge(ZStream.empty)
to be an identity.
If you want to complete the promise immediately when the stream is done you can just add a downstream that completes the promise when the stream is done.
from zio.
Related Issues (20)
- Missing `TestLens#cause` Macro Implementation
- Scala 2.13 - cannot compare child class to parent class in assertTrue HOT 8
- `You must not use an intersection type` when deriving ZLayer HOT 2
- ZIO does not work correctly with dependency T when T is a scala 3 opaque type HOT 15
- zio tests, missing suite constructor from ZIO[..,..,Suite[Env, Err]] HOT 2
- Add test lenses for Try HOT 1
- ZLayerCompanionVersionSpecific.derive has a wrong signature confusing IntelliJ IDEA HOT 4
- `ZIO#someOrElse` does not work with covariant type constructors applied to `Nothing` HOT 8
- `TestArrow::withLocation` and `TestArrow::meta` cannot override a TestArrows location. HOT 6
- ZPipeline.rechunk could be optimized HOT 5
- ZIO environment signature resolution is slow in Scala 3 HOT 4
- Unexpected behaviour with TestRandom HOT 1
- Unable to run JCStress tests
- zio 2.1.2 issue with stuck tests HOT 8
- Incorrect layer type when using a contravariant type parameter
- ZIO Config Guide Invalid link
- assertTrue primitive comparision regression (Scala 2)
- 2.1.3 regression of mapZIOPar(Unordered) with Int.MaxValue level of parallelism HOT 14
- .provide triggers WartRemover ExplicitImplicitTypes error in ZIO 2.1.3
- Scala Native CI takes too long to complete, degrading DX
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zio.