Commit Graph

16 Commits

Author SHA1 Message Date
Doug Gregor
177d16ced8 Enable strict memory safety in the Concurrency module 2025-02-26 14:28:24 -08:00
Allan Shortlidge
20d97556ae stdlib: Remove #if $TypedThrows guards.
https://github.com/swiftlang/swift/pull/72612 can be reverted because it is no
longer necessary for the interface of the stdlib to be compatible with
compilers without `$TypedThrows` support.
2024-07-08 16:52:52 -07:00
Michael Gottesman
cf93476d0b [region-isolation] Require T in assumeIsolated<T> to be Sendable.
I had to change the APIs to always be always emit into client instead of back
deployable since silgen_name seems to interfere with @backDeployment. So I
switched the implementation so that it instead uses an always emit into client
thunk with the in source function name and a usableFromInline function that has
the silgen_name. This ensures that we still appropriately export the same symbol
as we did before, so it is ABI stable.

This was approved as part of se-0414.

rdar://122030520
2024-04-02 13:49:13 -07:00
Konrad `ktoso` Malawski
86f5441294 [SerialExecutor] SerialExecutor.checkIsolated() to check its own tracking for isolation checks (#71172) 2024-03-29 07:06:34 +09:00
Allan Shortlidge
65c0ef830e Concurrency: Guard use of withoutActuallyEscaping() in inlinable code.
Since `withoutActuallyEscaping()` has adopted typed throws, it's no longer
visible to older compilers that do not support typed throws. We need to guard
use of the function in inlinable code to make sure the textual interface of
`_Concurrency` remains buildable with older compilers.

Resolves rdar://124352900
2024-03-12 10:34:57 -07:00
Allan Shortlidge
1680d5733d Concurrency: Remove superfluous trys in ExecutorAssertions.swift. 2024-01-13 16:23:55 -08:00
Konrad `ktoso` Malawski
70b1c0e43c [Concurrency] Major cleanup of assert/precondition/assume isolated docs (#70800)
Co-authored-by: Alex Martini <amartini@apple.com>
2024-01-10 23:48:32 -08:00
Doug Gregor
0fbbc6ae65 [SE-0392] Back-deploy assertIsolation/assumeIsolation
The assertIsolation/assumeIsolation operations on actors are
back-deployable back to the introduction of concurrency. Do so.

Resolves rdar://111880539
2023-12-14 15:13:46 -08:00
Konrad `ktoso` Malawski
828f589be4 Initial Task Executor implementation Task(on:), addTask(on:) etc. (#68793)
Co-authored-by: John McCall <rjmccall@gmail.com>
2023-12-12 17:14:24 +09:00
Kuba Mracek
90e1d2006f [embedded] Add support for actors and async let into the embedded Concurrency runtime 2023-10-09 22:43:50 -07:00
Konrad `ktoso` Malawski
b8780c9d9e [Executors] Move assert/assume APIs onto actors; assumeIsolated() (#64812) 2023-04-04 07:44:43 +09:00
Konrad `ktoso` Malawski
e0877594da [Concurrency] Custom executors with move-only Job (#63569) 2023-03-18 14:02:43 +09:00
Konrad `ktoso` Malawski
5d2a311dda [Executors] assumeOnLocalDistributedActorExecutor (isolated Act) -> 2023-03-16 13:23:47 +09:00
Kavon Farvardin
18d976f8fa guard assume on executor API against task-to-thread runtimes 2023-03-08 12:02:06 -08:00
Konrad `ktoso` Malawski
93decb6141 [Concurrency] Complement assume... APIs with the assert and precondition ones (#64062) 2023-03-04 08:03:29 +09:00
Konrad `ktoso` Malawski
3eb04e24a2 fix complete_concurrency_keyword's too imprecise assertions 2023-03-03 14:16:03 +09:00