How does Task.sleep(_) try matching its parameter?

In Apple Developer Documentation the docs say "Suspends the current task for at least the given duration in nanoseconds." and that makes a lot of sense - I assume a best effort will be made to resume the function after the given timeout or next availability for the given priority.

I'm trying to figure out how reliable is the duration we set - is there some special optimization bumping the priority of resuming functions that suspended via Task.sleep(...) or is Task.sleep(...) basically identical to yielding with an extra note "not to resume before the given duration" and there's the same effort made to resume it as all other suspended functions?

Terms of Service

Privacy Policy

Cookie Policy