Commit Graph

5 Commits

Author SHA1 Message Date
Konrad 'ktoso' Malawski
6872707574 [embedded][Concurrency] Further refine C-api boundary for isIsolating... 2025-04-29 22:29:26 +09:00
Konrad 'ktoso' Malawski
e1dc854f8f [Concurrency] Change isIsolatingCurrent... to return Bool?
This changes the isIsolatingCurrentContext function to return `Bool?`
and removes all the witness table trickery we did previously to detect
if it was implemented or not. This comes at a cost of trying to invoke
it always, before `checkIsolated`, but it makes for an simpler
implementation and more checkable even by third party Swift code which
may want to ask this question.

Along with the `withSerialExecutor` function, this now enables us to
check the isolation at runtime when we have an `any Actor` e.g. from
`#isolation`.

Updates SE-0471 according to
https://forums.swift.org/t/se-0471-improved-custom-serialexecutor-isolation-checking-for-concurrency-runtime/78834/
review discussions
2025-04-29 20:08:55 +09:00
Max Desiatov
cb0e1da0cb Revert "Revert "Concurrency: Move code between Executor{Bridge,Impl}.cpp"" (#80692)
* Revert "Revert "Concurrency: Move code between `Executor{Bridge,Impl}.cpp`""

* Update CMakeLists.txt
2025-04-10 05:35:28 -07:00
Artem Chikin
ef6cf5785b Revert "Concurrency: Move code between Executor{Bridge,Impl}.cpp (#80601)"
This reverts commit ccd9cf7b5e.
2025-04-09 11:07:31 -07:00
Max Desiatov
ccd9cf7b5e Concurrency: Move code between Executor{Bridge,Impl}.cpp (#80601)
New `ExecutorImpl.cpp` is excluded when building Embedded Swift stdlib. This fixes duplicate symbol errors when using Embedded Swift.
2025-04-09 05:36:07 -07:00