Concurrency Continuation lacks ~Copyable support

Noncopyable Standard Library Primitives
adds various supports of ~copyable to stdlib. like Optional, ManagedBuffer, pointer, Result ... etc.

However, I've realized that UnsafeContinuation still lacks supporting ~Copyable.

Thanks fully, I can use ManagedBuffer or Pointers to wrap ~Copyable.
But I want to be sure if this is the right way to do, since ManagedBuffer and Pointers are unSendable types.
Maybe, thanks to transferring is it okay to do?

Unsafe continuation is happy to be copyable though.

Itโ€™s totally valid to escape it into some contexts and use other means to ensure it is resumed once. Like โ€œfirst actor to complete should resume itโ€ etc.

Do you have something specific in mind perhaps?

I think they meant you can't produce a ~Copyable value as a result.

4 Likes

Oh thatโ€™s an interesting point! Iโ€™ll look into that.

3 Likes

So I think we should do it, but there's some issues with doing so currently which generate a bad .swiftinterface file, so that'd have to be resolved first.