Open
Description
Clang has bindings for Swift's @Sendable
protocol on blocks (with the default being non-sendable), we should add support for this into block2
.
Basic idea is to allow Block<dyn Fn() + Send + Sync>
, though since we don't have custom coercions yet, it likely won't be as pretty as through Deref
.
Notes in this comment on whether we should have both Send + Sync
, or if we can get away with one of those bounds.