# Making actor non reentrant

**URL:** <https://forums.swift.org/t/making-actor-non-reentrant/73131>\
**Category:** Using Swift\
**Created:** [July 12, 2024, 11:52am UTC](https://forums.swift.org/t/making-actor-non-reentrant/73131 "2024-07-12T11:52:51Z")\
**Posts on this page:** 1\
**Showing post:** 69

<div class="post-metadata">

**Author:** ![CrownedPhoenix](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/crownedphoenix/32/21940_2.png) [@CrownedPhoenix](https://forums.swift.org/u/CrownedPhoenix)\
**Post date:** [September 18, 2025, 4:11pm UTC](https://forums.swift.org/t/making-actor-non-reentrant/73131/69 "2025-09-18T16:11:16Z")

</div>

Cross posting a solution we found: [Actor Reentrancy - #16 by CrownedPhoenix](https://forums.swift.org/t/actor-reentrancy/59484/16)

Implemented an async semaphore that uses a waiter queue and task suspension.  
Then we use the async semaphore in actor methods.  
Because it leverages suspensions, it won’t block the actor from doing other work but it will prevent it from doing any work that involves another method before finishing the work on the method it’s in the middle of.

Though it bears recognizing that this will still result in a deadlock if misused.  
So… in that sense it kind of begs the point of the actor in the first place.

---

_[View the full topic](https://forums.swift.org/t/making-actor-non-reentrant/73131)._
