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

[Concurrency] typoの修正 #326

Merged
merged 1 commit into from
Jul 28, 2022
Merged

[Concurrency] typoの修正 #326

merged 1 commit into from
Jul 28, 2022

Conversation

t-ae
Copy link
Collaborator

@t-ae t-ae commented Jul 28, 2022

No description provided.

@github-actions github-actions bot requested a review from stzn July 28, 2022 09:19
@@ -242,7 +242,7 @@ print(logger.max) // エラー

ある同時実行ドメインから別のドメインに共有できる型は、「`Sendable` 型\(_Sendable Types_\)」と呼ばれます。例えば、アクターメソッドを呼び出すときに引数として渡すことも、タスクの結果として返すこともできます。この章の前半の例では、同時実行ドメイン間で渡されるデータに対して常に安全に共有できる単純な値型を使用しているため、`Sendable` かどうか\(_sendability_\)については説明していません。一方で、一部の型は同時実行ドメイン間で安全に渡すことができません。例えば、可変プロパティを含み、それらのプロパティへのアクセスを直列化していないクラスは、異なるタスク間でそのクラスのインスタンスを渡すときに、予測できない誤った結果を生成する可能性があります。

`Sendable` プロトコルへの準拠を宣言することにより、型を `Sendable` なことを示すことができます。`Sendable` プロトコルにはコード要件はありませんが、Swift が強制するセマンティック要件があります。一般に、型を `Sendable` にするには 3 つの方法があります。
`Sendable` プロトコルへの準拠を宣言することにより、型が `Sendable` なことを示すことができます。`Sendable` プロトコルにはコード要件はありませんが、Swift が強制するセマンティック要件があります。一般に、型を `Sendable` にするには 3 つの方法があります。
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本当は 型が Sendable であることを示すことができます にしたいがlintで弾かれる。

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おそらく「です、ます調ルール」のやつですね。必要であれば別issueで検討しましょう。

Copy link
Owner

@stzn stzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます!

@stzn stzn merged commit ede1f10 into stzn:master Jul 28, 2022
@t-ae t-ae deleted the concurrency branch August 2, 2022 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants