# Contract to not impede progress in concurrency pool

**URL:** <https://forums.swift.org/t/contract-to-not-impede-progress-in-concurrency-pool/83573>\
**Category:** Using Swift\
**Tags:** concurrency\
**Created:** [December 5, 2025, 12:30am UTC](https://forums.swift.org/t/contract-to-not-impede-progress-in-concurrency-pool/83573 "2025-12-05T00:30:24Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![David\_Smith](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/david_smith/32/37508_2.png) [@David\_Smith](https://forums.swift.org/u/David_Smith)\
**Post date:** [December 5, 2025, 10:19pm UTC](https://forums.swift.org/t/contract-to-not-impede-progress-in-concurrency-pool/83573/13 "2025-12-05T22:19:13Z")

</div>

Ok, confirmed my hypothesis: the issue is due to `Task.sleep` rather unintuitively requiring a thread from the pool even when it's run on the main actor. The main thread itself is actually completely responsive, but the timer gets delayed.

I'll make sure there's a bug tracking improving Task.sleep to avoid this (I think there already is one that will cover this for other reasons, but if I'm mistaken about that I'll file one).

Thanks for the test case! What a curious bug.

[edit] oh and the reason the priority matters is because the thread count cap on the pool is one thread per CPU core _per QoS bucket_, so when it's `.medium` the main thread is able to get a pool thread anyway.

---

_[View the full topic](https://forums.swift.org/t/contract-to-not-impede-progress-in-concurrency-pool/83573)._
