Commit Graph

18 Commits

Author SHA1 Message Date
Allan Shortlidge
c02fc4724d Tests: Remove -disable-availability-checking from many Concurrency tests.
Instead, use the `%target-swift-5.1-abi-triple` substitution to compile the tests
for deployment to the minimum OS versions required for use of _Concurrency APIs.
2024-10-18 16:21:51 -07: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
Konrad `ktoso` Malawski
24a38fc090 [Concurrency] Verify the #if guards around moveonly Job (#64477) 2023-03-20 20:09:45 +09:00
Konrad `ktoso` Malawski
e0877594da [Concurrency] Custom executors with move-only Job (#63569) 2023-03-18 14:02:43 +09:00
Kuba (Brecka) Mracek
7853184ed6 Enable running tests from test/Concurrency/ directory in freestanding/minimal presets (#61835)
* Enable running tests from test/Concurrency/ directory in freestanding/minimal presets

* Mark failing Concurrency tests as XFAIL/SKIP on freestanding/minimal
2022-11-04 09:07:27 -07:00
Saleem Abdulrasool
7f67dcb1f9 test: enable async/Distributed tests on Windows
These were previously disabled due to the UB that caused the tests to
fail.  Now that this has been fixed, restore these tests to running
state in line with the other targets.
2021-11-20 08:24:25 -08:00
Karoy Lorentey
47956908b7 [Concurrency] SwiftStdlib 5.5 ⟹ SwiftStdlib 5.1 (usages)
The concurrency runtime now deploys back to macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, which corresponds to the 5.1 release of the stdlib.

Adjust macro usages accordingly.
2021-10-28 14:36:36 -07:00
Doug Gregor
3ee09a2298 Switch concurrency runtime tests to "REQUIRES: concurrency_runtime"
Rather than blanket-disabling concurrency tests when we aren't using a
just-built concurrency library, enable them whenever we have a
suitable concurrency runtime, either just-built, in the OS, or via the
back-deployment libraries.
2021-09-13 12:34:20 -07:00
Doug Gregor
eeeea49764 Remove -enable-experimental-concurrency almost everywhere. 2021-07-26 21:24:43 -07:00
Michael Gottesman
dae605afa2 [concurrency] Disable custom executor tests on Windows since they seem to hang.
Custom executor isn't a true feature yet, so I am disabling on Windows until we
can look at why the hangs are occuring on Windows.
2021-07-22 13:25:10 -07:00
Doug Gregor
1e2012d816 Disable availability checking in tests that use concurrency 2021-07-20 12:46:26 -07:00
Saleem Abdulrasool
21126b4277 test: enable some Concurrency tests on Windows
This enables a few Concurrency tests that should be passing on Windows
(at least do so locally).
2021-07-06 16:22:43 -07:00
Alexis Laferrière
7487c12d05 Merge pull request #37269 from xymus/test-macro
[Concurrency] Define and use the SwiftStdlib 5.5 availability macro in tests
2021-05-10 10:46:53 -07:00
Doug Gregor
052cc7d022 [Concurrency] Revert 'nonisolated let' change.
The change made to SE-0306 to require 'nonisolated let' is undercutting
the effectiveness of the model. Revert while we work on a better
solution.
2021-05-06 17:30:11 -07:00
Alexis Laferrière
3310a55682 [Test] Use the SwiftStdlib 5.5 macro in Concurrency tests 2021-05-06 13:48:49 -07:00
Arnold Schwaighofer
1fc81fe726 Fix some concurrency tests not to run on os stdlib bots
rdar://77564014
2021-05-05 10:35:42 -07:00
John McCall
20741e059b Disable this test on Windows; it seems to not progress. (#37200)
I assume there's a common underlying problem for this and a lot of
other concurrency tests that are disabled on Windows.
2021-05-01 10:12:11 -07:00
John McCall
186c53000d Introduce basic support for custom executors.
- Introduce an UnownedSerialExecutor type into the concurrency library.
- Create a SerialExecutor protocol which allows an executor type to
  change how it executes jobs.
- Add an unownedExecutor requirement to the Actor protocol.
- Change the ABI for ExecutorRef so that it stores a SerialExecutor
  witness table pointer in the implementation field.  This effectively
  makes ExecutorRef an `unowned(unsafe) SerialExecutor`, except that
  default actors are represented without a witness table pointer (just
  a bit-pattern).
- Synthesize the unownedExecutor method for default actors (i.e. actors
  that don't provide an unownedExecutor property).
- Make synthesized unownedExecutor properties `final`, and give them
  a semantics attribute specifying that they're for default actors.
- Split `Builtin.buildSerialExecutorRef` into a few more precise
  builtins.  We're not using the main-actor one yet, though.

Pitch thread:
  https://forums.swift.org/t/support-custom-executors-in-swift-concurrency/44425
2021-04-30 03:11:56 -04:00