Skip to content
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

#693: DataPublisher created from async function should start lazily #708

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

khlopko
Copy link
Contributor

@khlopko khlopko commented Jun 22, 2023

Fix for the issue: #693.

Future is generally better approach than PassthroughSubject when you need to execute something once (e.g. network requests). What was failing in the original solution by the issue author is that Future starts execution right after creation as well, and needs to be wrapped in Deferred in order to start only after subscribing to it.

@kean
Copy link
Owner

kean commented Jun 23, 2023

Works as advertised, thanks, @khlopko. I appreciate you taking time to address it.

@kean kean merged commit a84b6ce into kean:main Jun 23, 2023
9 checks passed
@khlopko khlopko deleted the issue-693 branch June 23, 2023 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants