Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-7522] End dynamic exclusivity duration immediately before a nonmutating didSet #50064

Closed
jckarter opened this issue Apr 24, 2018 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@jckarter
Copy link
Member

Previous ID SR-7522
Radar rdar://problem/39691442
Original Reporter @jckarter
Type Bug
Status Closed
Resolution Invalid
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 0f79c81b92d452ed87c1721e440c15f4

Issue Description:

Currently, for a stored class property with a `didSet` observer, exclusivity is enforced through the `didSet`, meaning that code invoked during `didSet` can't even read the new value from the property. We should end the dynamic enforcement before `didSet` is run so that code running during `didSet` can freely read the new value. (Note that this can only apply to stored class properties with nonmutating setters; mutating setters have exclusivity enforced from outside and can't end the duration mid-mutation.)

@jckarter
Copy link
Member Author

@swift-ci create

@atrick
Copy link
Member

atrick commented Apr 28, 2018

This vaguely sounds like a dup of https://bugs.swift.org/browse/SR-7268 because it's talking about exclusivity violation on nonmutating setters.

But otherwise, the description does not sound correct. For stored class properties, exclusivity duration does end before the didSet call.

@jckarter can you dup, close, or clarify this?

@atrick
Copy link
Member

atrick commented Jun 28, 2018

@jckarter can reopen this if there's something to be done. I can't figure out what the problem is.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants