In embedded mode, we mustn't have references to the C++ library, because
some embedded platforms don't include the C++ library.
Additionally, it's good to avoid use of global operator new and operator
delete, because they can be globally overridden and this has bitten us
in the past.
rdar://137286187
The way that we include COMPATIBILITY_OVERRIDE_INCLUDE_PATH freaks out the
syntax highlighting of editors like emacs. It causes the whole file to be
highlighted like it is part of the include string.
To work around this, this patch creates a separate file called
CompatibilityOverrideIncludePath.h that just includes
COMPATIBILITY_OVERRIDE_INCLUDE_PATH. So its syntax highlighting is borked, but
at least in the actual files that contain real code, the syntax highlighting is
restored.
`SWIFT_STDLIB_SINGLE_THREADED_CONCURRENCY` just means that the global
executor is cooperative, but it doesn't mean that the target platform is
always single-threaded. For example, on wasm32-unknown-wasip1-threads,
the global executor is cooperative, but users can still set up their own
TaskExecutor with multiple threads.
This patch guards the `TaskGroup` state with a mutex even with a
cooperative executor by respecting threading package instead. This
change effectively affects only wasm32-unknown-wasip1-threads.
The `swift_unreachable()` is currently statically unreachable but we'd like to
leave it in place in case the control flow before it changes in the future.
ASL is deprecated in macOS 10.12. It may be time to transition to os_log now
that deployment targets have been raised to 10.12, but until that project
starts these warnings are just pollution.
Filed rdar://121066531 to track adoption of `os_log()` if appropriate.
released memory.
Because the waitAll() group method is called before the group returns
from withTaskGroup and is used to ensure all tasks have completed before
we destroy the task group, this method is then immediately followed by
calling TaskGroup::destroy.
If we, as previously, first resume the waiting task and then attempt to
unlock the lock held by the group, we are in an unsafe situation with
racing the task group destroy() and the unlock().
Therefore, we must release the lock before we resume the waiting task.
status record that is already registered with the task. Provide more
versatile removeStatusRecord functions and update clients to use them
Radar-Id: rdar://problem/101864092
done the load or who need the oldStatus information after adding the
status record.
Change some of the memory barrier logic since we can take advantage of
load-through HW address dependency.
Radar-Id: rdar://problem/105634683
field of an ActiveTaskStatus can also be modified while the
TaskStatusRecord list is being modified. Make the StatusRecordLock
reentrant.
Radar-Id: rdar://problem/88093007
* [Concurrency] Fix too optimistic bail-out-when-empty, discarding group
may need to emit an error out of such waitAll attempt, if a previous
error was already stored.
* [Concurrency] DiscardingTG error thrown from body always wins
* Offering body error must be done while holding lock
* Must not modify waitingTask context outside lock
* wip on trying to fix by changing the offer
* fix bug in resuming tasks in offer/resume task in discarding group
* Fix#63147 waitForAll impl in ThrowingTaskGroup, used to not wait enough
rdar://104507347
* done
* debug
* explicitly declare virtual destructors
* detach child task after filling result; dont mutate context outside of lock
* Add pending count overflow protection to TaskGroup
* unlock async_taskgroup_void_neverConsumingTasks again rdar://104332560
* missing include on windows for error reporting
* fix ARM_ARCH_7K workaround snippet