-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mergeSources terminates only after both sources have terminated (?) #35
Comments
This hasn't been done yet. A pull request with the function (pretty much copy+pasted from |
Hello, @kjameslubin sorry for the very late response. I was going to start working on this function but I understood that I do not understand the semantics we want to have in presence of exceptions. Also I don't see the most preferable way, or simple API, simple solution that would allow to alter the behaviour. What are the questions:
If you help me to define the sane semantics I would be able to provide such a function. But more I'm thinking about that the more I lean to the solution that the library should not have such a primitive, instead it should provide enough building blocks that allows to write a merge function with the semantics that is exactly needed for the scenario. |
Is there a way to have mergeSources terminate after one of the sources has terminated? I can show you a code sample if need be. Basically, my use case is that I've made a source out of a Postgres trigger/notify thread, and a source that is is the appSource for a tcp server, and merged them. When the appSource terminates, the trigger thread sticks around - which is a file descriptor leak.
I could likely roll something with e.g. STM to make the trigger thread stop but I thought you might have done it already given how mergeSources is implemented.
The text was updated successfully, but these errors were encountered: