Travis Griggs
02/23/2024, 1:00 AMpasskeysSync
which I dutifully made a suspend fun, because I updated our settings story to use the newer DataStore stuff. In some of my code, I have very good place to grab a scope and do a launch with this guy. But I'm also using an imported library, HiveMQ and using it's "asynchronous API". I register a message handler callback with the async client, and in some cases, I need to run this passkeysSync function. Is a time when it's OK to use runBlocking { }
around my suspend fun? Or is there some other technique/pattern I ought to be using in this case?jw
02/23/2024, 1:14 AMUnit
into a conflated channel from the callback. Have a coroutine looping on the channel and running the sync.gildor
02/28/2024, 4:57 AMsuspendCancellableCoroutine
builder
It would be helpful if you share example of code what you are trying to dogildor
02/29/2024, 7:14 AMgildor
02/29/2024, 7:25 AMgildor
02/29/2024, 7:26 AMgildor
02/29/2024, 7:27 AMgildor
02/29/2024, 7:27 AM