# \[Returned for revision\] SE-0316: Global Actors

**URL:** <https://forums.swift.org/t/returned-for-revision-se-0316-global-actors/49715>\
**Category:** Announcements\
**Created:** [June 17, 2021, 4:49pm UTC](https://forums.swift.org/t/returned-for-revision-se-0316-global-actors/49715 "2021-06-17T16:49:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Groff](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/joe_groff/32/1929_2.png) [@Joe\_Groff](https://forums.swift.org/u/Joe_Groff)\
**Post date:** [June 17, 2021, 4:49pm UTC](https://forums.swift.org/t/returned-for-revision-se-0316-global-actors/49715/1 "2021-06-17T16:49:00Z")

</div>

The [review](https://forums.swift.org/t/se-0316-global-actors/48905) of [SE-0316: Global Actors](https://github.com/apple/swift-evolution/blob/main/proposals/0316-global-actors.md) has concluded, and the core team has decided to **return the proposal for revision**. There were several points of feedback that the next revision should address:

- As [one of the authors notes](https://forums.swift.org/t/se-0316-global-actors/48905/22), and [as was suggested by @anandabits in the first review](https://forums.swift.org/t/se-0316-global-actors/48905/23), it is useful for `GlobalActor` to be a formal protocol instead of an ad-hoc attribute. This allows for code to be generic over global actors.
- @Chris_Lattner3 notes that [the treatment of mutable global and static variables in this proposal](https://forums.swift.org/t/se-0316-global-actors/48905/20) is incomplete. As written, the proposal ambivalently states "we can require" globals to either be annotated with a global actor or be `nonisolated let` s, but the handling of globals is a big design space that should be explored in its own proposal. The global actors proposal should not try to address it at this point.
- @gwendal.roue raises a [question about how `@MainActor` code interacts with code that is dynamically already running on the main thread](https://forums.swift.org/t/se-0316-global-actors/48905/13). It is important in many situations to avoid inserting a hop before code that runs on the main thread, and in practice, the `@MainActor` executor implementation already dynamically checks whether code is running on the main thread before scheduling a hop for main actor code. The proposal should be revised to promise this.
- @beccadax [requests a clarification of the grammar](https://forums.swift.org/t/se-0316-global-actors/48905/30) of closure attributes relative to other parts of the closure syntax.

The review discussion during this round also did not provide much comment about the inference rules for global actors. These are rather intricate and subtle, so the core team would like some more feedback on how well they work in real-world code.

Because Juneteenth weekend is starting tomorrow, June 18, for many U.S. developers, I will schedule the next review to begin next Monday, June 21. Doug has already [revised the proposal](https://github.com/apple/swift-evolution/pull/1390) to take the above feedback into account.

Thanks to everyone who participated in the review!

---

<div class="post-metadata">

**Author:** ![anandabits](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/anandabits/32/355_2.png) [@anandabits](https://forums.swift.org/u/anandabits)\
**Post date:** [June 17, 2021, 6:17pm UTC](https://forums.swift.org/t/returned-for-revision-se-0316-global-actors/49715/2 "2021-06-17T18:17:12Z")

</div>

I’m happy to see that there is now a `GlobalActor` protocol but I’m confused by why an attribute is still used and the conformance is implicit. Why not get rid of the attribute and have user code state the conformance explicitly?

---

<div class="post-metadata">

**Author:** ![Douglas\_Gregor](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/douglas_gregor/32/1362_2.png) [@Douglas\_Gregor](https://forums.swift.org/u/Douglas_Gregor)\
**Post date:** [June 17, 2021, 6:42pm UTC](https://forums.swift.org/t/returned-for-revision-se-0316-global-actors/49715/3 "2021-06-17T18:42:49Z")

</div>

> [@anandabits](#):
>
> I’m happy to see that there is now a `GlobalActor` protocol but I’m confused by why an attribute is still used and the conformance is implicit. Why not get rid of the attribute and have user code state the conformance explicitly?

My thinking here is that all types that are custom attributes today (result builders and property wrappers) are themselves marked with an attribute to make it clear from the type definition that they can be used as an attribute, so global actors should be as well. We could use the conformance as a marker instead, but (1) it would be inconsistent, and (2) it makes it more expensive for tools to determine what types can be used as custom attributes because they have to resolve protocol conformances.

Doug
