Konrad `ktoso` Malawski
9906199d8e
[Concurrency] Harden task group test which is sensitive to timing ( #75612 )
2024-08-02 06:48:29 +09:00
Ben Barham
d281fb8868
Merge pull request #74883 from finagolfin/droid
...
[android] Enable several C++ Interop and other tests
2024-07-26 11:18:07 -07:00
Konrad `ktoso` Malawski
423a87e6ca
[Concurrency] Add test covering both serial and task executor in same type ( #75393 )
2024-07-22 02:17:58 -07:00
Finagolfin
15e1c73969
[android][test] Enable several C++ Interop and other tests
...
Also, fix lit.cfg for running the test suite natively in Android and mark one
SILOptimizer executable_test as such.
2024-07-20 17:56:51 +05:30
Konrad `ktoso` Malawski
a4e66f6159
[Concurrency] rework test to use StdlibUnittest rather than "not" ( #75152 )
2024-07-11 17:19:32 +09:00
Konrad `ktoso` Malawski
a3e0b173ea
[Concurrency] TaskExecutors may be non-swift objects; dont swift_release them ( #75059 )
2024-07-09 02:55:11 -07:00
Konrad `ktoso` Malawski
b9369bf0b7
[Concurrency] Fix default actor isolation issue in face of TaskExecutor preference ( #74658 )
...
* [Concurrency] Fix task excutor handling of default actor isolation
The task executor API did not properly account for taking the default
actor locking into account when running code on it, we just took the job
and ran it without checking with the serial executor at all, which
resulted in potential concurrent executions inside the actor --
violating actor isolation.
Here we change the TaskExecutor enqueue API to accept the "target"
serial executor, which in practice will be either generic or a specific
default actor, and coordinate with it when we perform a
runSynchronously.
The SE proposal needs to be amended to showcase this new API, however
without this change we are introducing races so we must do this before
the API is stable.
* Remove _swift_task_enqueueOnTaskExecutor as we don't use it anymore
* no need for the new protocol requirement
* remove the enqueue(_ job: UnownedJob, isolatedTo unownedSerialExecutor: UnownedSerialExecutor)
Thankfully we dont need it after all
* Don't add swift_defaultActor_enqueue_withTaskExecutor and centralize the task executor getting to enqueue()
* move around extern definitions
2024-07-01 16:42:27 +09:00
Konrad `ktoso` Malawski
edb4d4b463
[Concurrency] Make deinit check test not racy
...
The test is checking that the task executor deinit runs after task
completes. This deinit is caused on a different thread, and thus is
racing with the main() completing. This is racy because as main() exits,
we just exit the process and may not see the deinit get printed, making
the test look like the deinit "didnt trigger" but it did, just was
"late to the party"
resolves rdar://130528198
2024-06-27 22:50:26 +09:00
Konrad `ktoso` Malawski
2ec717b115
[Concurrency] TaskExecutor ownership fixes ( #74000 )
2024-06-14 22:56:33 +09:00
Konrad `ktoso` Malawski
fe66c47b8a
[docs] Provide more documentation on custom executors with global actors
...
It could be confusing to adopters who were led to believe by the types
that they should "just" implement the sharedUnownedExecutor property,
but insead they have to implement the unownedExecutor on the specific
actor type.
Adding documentation clarify this as well as a simple test that
exercises this explicitly; We seem to have much coverage of main actor,
but not so much of custom executor global actors.
2024-06-12 12:28:55 +09:00
Alex Lorenz
5aa63fc93e
Merge pull request #72634 from hyp/eng/android/ndk-overlay
...
[android] add an Android NDK Swift overlay
2024-06-05 19:35:13 -07:00
Konrad `ktoso` Malawski
14b8546392
[Concurrency] Don't add new task locals copy runtime func
2024-06-03 13:55:02 +09:00
Konrad `ktoso` Malawski
0c44645832
[Concurrency] Implement defensive copying in task groups, rather than crashing ( #73978 )
2024-05-31 11:27:03 -07:00
Konrad `ktoso` Malawski
aa27a04bff
[Concurrency] Disable test on simulators; unexpected env behavior
2024-05-29 14:20:06 +09:00
Alex Lorenz
420e03fca6
add one more concurrency test fix
2024-05-28 13:01:05 -07:00
Alex Lorenz
0f9a69c712
android test fixes
2024-05-28 12:59:26 -07:00
Hamish Knight
adfe824c3d
[test] Disable actor_assert_precondition_executor_checkIsolated_main_customExecutorOnMain_swift6_mode.swift
2024-05-28 14:53:28 +01:00
Konrad `ktoso` Malawski
7eef019dcd
Merge pull request #73813 from ktoso/pick-concurrency-isCurrent-more-fixes
2024-05-28 15:52:43 +09:00
Konrad `ktoso` Malawski
347864b598
disable custom_executors_complex_equality_crash on linux for now
2024-05-28 12:08:33 +09:00
Konrad `ktoso` Malawski
ad3d38a30f
[Concurrency] async/sync body simplest test for task local to double-check
2024-05-28 10:09:31 +09:00
Konrad `ktoso` Malawski
b90aad2244
[Concurrency] add missing requires libdispatch, unbreaks Windows test
2024-05-27 17:02:27 +09:00
Konrad `ktoso` Malawski
17937e94e8
fix missing %import-libdispatch in test
2024-05-27 17:02:27 +09:00
Konrad `ktoso` Malawski
80ce40b3bb
[Concurrency] adjust custom_executors_complex_equality_crash.swift for swift6/legacy modes
2024-05-27 17:02:26 +09:00
Konrad `ktoso` Malawski
153806b71a
[Concurrency] Reshape initial values of executor checking so tests pass on Linux
2024-05-27 17:02:26 +09:00
Konrad `ktoso` Malawski
7790609fc8
[Concurrency] Futher prevent crashes in legacy mode of isCurrentExecutor
2024-05-27 17:02:26 +09:00
Konrad `ktoso` Malawski
1c522b0312
[TaskLocal] TL macro must handle force unwrapped optional types
...
Resolves rdar://128225191
2024-05-17 11:12:02 +09:00
Konrad `ktoso` Malawski
4acaa40477
[Concurrency] Add explicit test for DispatchQueue.main.async + asserting
2024-05-10 15:51:50 +09:00
Konrad `ktoso` Malawski
7224178b85
[TaskLocal] Carry access control modifiers into synthesized property ( #73475 )
2024-05-07 20:13:23 +09:00
Konrad `ktoso` Malawski
dc5e354d69
[Concurrency] Reimplement @TaskLocal as a macro ( #73078 )
2024-05-01 20:57:20 -07:00
Meghana Gupta
93eeee7755
Disable some concurrency tests
2024-04-09 11:33:25 -07:00
Konrad `ktoso` Malawski
fb4ffb43db
[Concurrency] Add missing runSynchronously to ExecutorJob ( #72899 )
2024-04-08 13:41:08 +09:00
Konrad `ktoso` Malawski
dfcf1054dd
[Concurrency] Remove _unsafeInheritExecutor from public APIs, use #isolation ( #72578 )
2024-04-05 03:57:54 -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
Alexis Laferrière
e929235282
Merge pull request #72306 from xymus/revert-xfail-freestanding
...
Tests: un-xfail tests on the freestanding bot
2024-03-13 20:15:26 -07:00
Alexis Laferrière
81e465971c
Tests: un-xfail tests on the freestanding bot
2024-03-13 13:32:41 -07:00
Holly Borla
154f47ecef
Merge pull request #72252 from hborla/concurrency-lib-annotations
...
[Concurrency] Add a few missing `Sendable` annotations in the concurrency library.
2024-03-13 07:05:27 -07:00
Konrad `ktoso` Malawski
d4c347c3a1
[Concurrency] Adjustments to withTaskExecutorPreference ( #71973 )
2024-03-13 06:24:30 -07:00
Holly Borla
dfa7b866c7
[Concurrency] Clock.measure should inherit actor isolation.
2024-03-12 22:55:34 -07:00
Holly Borla
377b5274ff
[Concurrency] Async{Throwing}Stream.init(unfolding:) should accept a
...
`@Sendable` closure.
2024-03-12 22:55:34 -07:00
Alexis Laferrière
841740e7ab
Tests: XFAIL a few tests on freestanding
...
rdar://121121793
2024-03-11 13:29:49 -07:00
Kavon Farvardin
4b7b4ca6dd
Test: allow one retry for flaky test
2024-02-19 19:03:05 -08:00
Konrad `ktoso` Malawski
6f4571e6ec
Revert "Disable some tests" which were disabled due to ptr auth issues ( #71440 )
...
* Revert "Disable some tests"
* Discard changes to test/attr/attr_originally_definedin_backward_compatibility.swift
* fix whitespace
2024-02-08 05:55:21 -08:00
Pavel Yaskevich
09991db863
Merge pull request #71327 from xedin/raise-unexpected-executor-log-level
...
[stdlib] Make expected actor isolation checking crash by default
2024-02-05 09:45:55 -08:00
Pavel Yaskevich
87878461a5
[stdlib] Make expected actor isolation checking crash by default
...
Only affects projects compiled with `-enable-actor-data-race-checks` flag.
2024-02-02 23:53:18 -08:00
Guillaume Lessard
114f235d17
Merge pull request #71167 from vanvoorden/vanvoorden/inclusive-language
...
[Inclusive Language][Comments][Documentation] migrate "sanity" checks to "soundness" checks
2024-02-02 10:27:34 -08:00
Konrad `ktoso` Malawski
bd19d937f0
[TaskExecutor] Remove underscore from new APIs ( #71145 )
2024-01-30 06:27:54 +09:00
Rick van Voorden
f8ae46b3f3
[inclusive-language] changed sanity to soundness
2024-01-25 18:18:02 -08:00
Konrad `ktoso` Malawski
1dec00a420
[TaskExecutors] Task initializer and withTaskExecutor parameter changes ( #70783 )
2024-01-20 11:03:26 +09:00
Allan Shortlidge
fb58fa18dd
Disable various async_task_executor tests for arm64e.
2024-01-15 22:11:25 -08:00
Allan Shortlidge
ac464f3d15
Revert "Disable some Concurrency tests on freestanding"
...
This reverts commit a8e79e7430 .
2024-01-03 13:59:02 -08:00