AsyncPublisher and Sendable

As far as I can tell AsyncPublisher and AsyncThrowingPublisher are not Sendable. I'm trying to address the Sendable warnings in our code when compiling with strict-concurrency.

The aforementioned types do not seem to be Sendable, but it seems to me they will be often used in context's that require them to be Sendable.

For example, I'm capturing a reference to an AsyncPublisher in a Task closure, and that closure requires the captures to be Sendable.

What are my options in this case?

1 Like

Hey @tourultimate , did you find the workaround for this? I'm currently doing what you're doing now and wondering how did you approach this.

IIRC, I don't think we were able to fix that warning. The region based isolation might eventually help.

1 Like