Yes, it was a recent revelation to me that polling can be more efficient than interrupts in some cases.
This is more meta level but this pitch is one of the first ones where we could use package traits. I was thinking about how we could integrate this into swift-nio
while making sure that the APIs are working in practice. It is quite common that we need to do small tweaks to the API after integrating it and it getting the first production usage. One use-case for package traits is modeling experimental features across packages. We could put the new io_uring APIs behind an ExperimentalIOUring
trait in swift-system
. swift-nio
could then redefine the same trait and conditionally enable swift-system
s trait. This would give us some time to land the feature across the ecosystem and stabilize it before we have to fully commit to the API.
The other thing I would suggest is, should it be in Swift System if there’s no Darwin support?
Despite its name, Swift System has been designated the place for OS-specific APIs, not universal abstractions.
Right, though I'm somewhat confused by "despite its name". Swift System's purpose is to provide swift bindings for host system semantics. Hence, "Swift System".