#include <CancellationContext.h>
Definition at line 21 of file CancellationContext.h.
◆ CancellableWPtr
◆ CancellationContext() [1/3]
audacity::concurrency::CancellationContext::CancellationContext |
( |
Tag |
| ) |
|
|
explicit |
◆ CancellationContext() [2/3]
audacity::concurrency::CancellationContext::CancellationContext |
( |
const CancellationContext & |
| ) |
|
|
delete |
◆ CancellationContext() [3/3]
◆ Cancel()
void audacity::concurrency::CancellationContext::Cancel |
( |
| ) |
|
Definition at line 24 of file CancellationContext.cpp.
25{
27 return;
28
29 std::vector<CancellableWPtr> cancellableObjects;
30
31 {
34 }
35
36 std::for_each(
37 cancellableObjects.begin(), cancellableObjects.end(),
38 [](auto& wptr)
39 {
40 if (auto lock = wptr.lock())
41 lock->Cancel();
42 });
43}
std::mutex mCancellableObjectsMutex
std::vector< CancellableWPtr > mCancellableObjects
std::atomic< bool > mCancelled
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
References mCancellableObjects, mCancellableObjectsMutex, mCancelled, and anonymous_namespace{NoteTrack.cpp}::swap().
◆ Create()
◆ OnCancelled()
void audacity::concurrency::CancellationContext::OnCancelled |
( |
CancellableWPtr |
cancellable | ) |
|
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ mCancellableObjects
std::vector<CancellableWPtr> audacity::concurrency::CancellationContext::mCancellableObjects |
|
private |
◆ mCancellableObjectsMutex
std::mutex audacity::concurrency::CancellationContext::mCancellableObjectsMutex |
|
private |
◆ mCancelled
std::atomic<bool> audacity::concurrency::CancellationContext::mCancelled { false } |
|
private |
The documentation for this class was generated from the following files: