You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling udContext_Connect from a widget blocks rendering while the network request is made.
I tried using an Isolate with compute() to call the function from a different thread but ran into the issue that an ffi.Pointer can't be passed as a parameter to an Isolate.
The text was updated successfully, but these errors were encountered:
it looks like you can send anything over the SendPort/ReceivePort - I'm not sure if it's a copy of the memory or if it's transferring the ownership. Given that a number of our APIs tend to hit disk or the network, you might be better off keeping all of the udSDK interactions in the other isolate. Then just send/receive data as required, so logging in could be:
or something similar that would work in Dart. I'm not sure how you don't stall the main isolate while waiting for a response from the udSDK isolate though, but I'm sure there's plenty of examples of how that works using futures - probably using a bool to indicate that the future has completed instead of using the await keyword, would be my guess.
I don't think the bool would be required at all - when the main isolate receives a message from the udSDK isolate, it would just change the state of the application at that point to logged in with whatever additional information you send back to the main isolate.
Calling udContext_Connect from a widget blocks rendering while the network request is made.
I tried using an Isolate with
compute()
to call the function from a different thread but ran into the issue that an ffi.Pointer can't be passed as a parameter to an Isolate.The text was updated successfully, but these errors were encountered: