question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add start parameter to launchIn extension for Flow

See original GitHub issue

Usage would look like so:

someFlow.launchIn(lifecycleScope, start = CoroutineStart.UNDISPATCHED)

My current use-case is to have the UI be set up synchronously by the flow collection start, avoiding an extra unneeded layout pass in an Android app in case collecting the flow has such side-effects.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
elizarovcommented, Jul 14, 2019

Would simply using Dispatchers.Main.immediate have the same effect (globally)?

0reactions
fvascocommented, Jul 15, 2019

#1340 can fix my use case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kotlin flows on Android - Android Developers
In coroutines, a flow is a type that can emit multiple values sequentially, as opposed to suspend functions that return only a single...
Read more >
Browser automation actions reference - Power Automate
To add a new UI element, select Add UI element through the deployed browser automation action or the UI elements pane of the...
Read more >
A safer way to collect flows from Android UIs | by Manuel Vivo
Using the lifecycleScope.launch or launchIn APIs are even more dangerous as the view keeps consuming locations even if it's in the background!
Read more >
Asynchronous Flow - Kotlin
A suspending function asynchronously returns a single value, ... The flow starts afresh every time it is collected and that is why we...
Read more >
Customize a Flow URL to Control Finish Behavior
Launching an OmniScript From an Object Detail Page Using a Custom... Launch OmniScripts in Communities from URLs · Link Your Salesforce Org to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found