diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-29 16:53:12 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-04-29 16:53:12 +0300 |
commit | d4788f5eb3f94e01a6575f227f2ab80330f1a8e1 (patch) | |
tree | 09c028105b4e34a2969e32e2c49405d48a6b9f01 /src/periodic.h | |
parent | de2dd81306da54b0bfdd9b075dc5de90c871b9af (diff) |
Periodic: Handling removal during iteration
Diffstat (limited to 'src/periodic.h')
-rw-r--r-- | src/periodic.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/periodic.h b/src/periodic.h index 8886617b..3a0501d9 100644 --- a/src/periodic.h +++ b/src/periodic.h | |||
@@ -21,6 +21,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | 21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ |
22 | 22 | ||
23 | #include <the_Foundation/mutex.h> | 23 | #include <the_Foundation/mutex.h> |
24 | #include <the_Foundation/ptrset.h> | ||
24 | #include <the_Foundation/sortedarray.h> | 25 | #include <the_Foundation/sortedarray.h> |
25 | 26 | ||
26 | iDeclareType(Periodic) | 27 | iDeclareType(Periodic) |
@@ -31,6 +32,7 @@ struct Impl_Periodic { | |||
31 | iMutex * mutex; | 32 | iMutex * mutex; |
32 | iSortedArray commands; | 33 | iSortedArray commands; |
33 | uint32_t lastPostTime; | 34 | uint32_t lastPostTime; |
35 | iPtrSet pendingRemoval; /* contexts */ | ||
34 | }; | 36 | }; |
35 | 37 | ||
36 | void init_Periodic (iPeriodic *); | 38 | void init_Periodic (iPeriodic *); |