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
So it appears to me that ConfigUpdateListenerRegistration should be thread-safe. If so, can we please mark the type as Sendable so that I don't have to do this @unchecked Sendablewrapper to avoid the Swift 6 errors?
API Proposal
Just mark the ConfigUpdateListenerRegistration type as Sendable.
Firebase Product(s)
Remote Config
The text was updated successfully, but these errors were encountered:
@ehyche Thanks for the issue. We've added the Sendable annotation to ConfigUpdateListenerRegistration for our next release.
Separately, we'll also consider adding AsyncStream based listening APIs to the SDK, probably in conjunction with or after reimplementing FirebaseRemoteConfig in Swift.
Description
I am creating an extension on
RemoteConfig
to provide anAsyncStream
API on top ofaddOnConfigUpdateListener()
:As you can see, since
ConfigUpdateListenerRegistration
is notSendable
, then I am wrapping it in an@unchecked Sendable
struct.From looking at the code, this appears to be safe to me, since in the implementation of the
ConfigUpdateListenerRegistration.remove()
method:which in turn does an operation on a serial queue:
So it appears to me that
ConfigUpdateListenerRegistration
should be thread-safe. If so, can we please mark the type asSendable
so that I don't have to do this@unchecked Sendable
wrapper to avoid the Swift 6 errors?API Proposal
Just mark the
ConfigUpdateListenerRegistration
type asSendable
.Firebase Product(s)
Remote Config
The text was updated successfully, but these errors were encountered: