You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this option with -fsanitize=thread requires annotating the code
using macros. This may be done later if anyone requires it.
Fixed grammar and style issues in README.md
Signed-off-by: Ted Lyngmo <ted@lyncon.se>
Copy file name to clipboardExpand all lines: README.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ class timer_queue<R(Args...), Clock, TimePoint>;
21
21
```
22
22
23
23
---
24
-
A timer queue provides constanttime lookup of the first event to timeout, at the expense of logarithmic insertion and extraction.
24
+
A timer queue provides constant-time lookup of the first event to timeout, at the expense of logarithmic insertion and extraction.
25
25
26
26
#### Template parameters
27
27
@@ -59,21 +59,21 @@ A timer queue provides constant time lookup of the first event to timeout, at th
59
59
|<br>Functions to add single events ||
60
60
|-|-|
61
61
|`void emplace_do(event_type ev)`| Add an event. If `SetDelayEnabled` is `true`, adds `now_delay` to the current time. This is also affected by `set_delay_until` (see below). |
62
-
|`void emplace_do_urgently(event_type ev)`| Add an event, placing the event last among those added with `emplace_do_urgently`, but before all other events in queue |
62
+
|`void emplace_do_urgently(event_type ev)`| Add an event, placing the event last among those added with `emplace_do_urgently`, but before all other events in the queue |
63
63
|`void emplace_do_at(time_point tp, event_type ev)`| Add an event that is due at the specified `time_point`|
64
64
|`void emplace_do_in(duration dur, event_type)`| Add an event that is due after the specified `duration`|
65
65
66
66
|<br>Functions to add events in bulk ||
67
67
|-|-|
68
-
|`template<class Iter>`<br>`void emplace_schedule(Iter first, Iter last)`| Place a number of events in queue. If `SetDelayEnabled`, adds `now_delay` to the current time. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `event_type`. This overload is also affected by `set_delay_until` (see below). |
69
-
|`template<class Iter>`<br>`void emplace_schedule(Iter first, Iter last)`| Place a number of events in queue. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `schedule_at_type`.|
70
-
|`template<class Iter>`<br>`void emplace_schedule(Iter first, Iter last)`| Place a number of events in queue in relation to `clock_type::now()`. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `schedule_in_type`.|
71
-
|`template<class Iter>`<br>`void emplace_schedule(time_point T0, Iter first, Iter last)`| Place a number of events in queue in relation to `T0`. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `schedule_in_type`.|
68
+
|`template<class Iter>`<br>`void emplace_schedule(Iter first, Iter last)`| Place a number of events in the queue. If `SetDelayEnabled`, adds `now_delay` to the current time. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `event_type`. This overload is also affected by `set_delay_until` (see below). |
69
+
|`template<class Iter>`<br>`void emplace_schedule(Iter first, Iter last)`| Place a number of events in the queue. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `schedule_at_type`.|
70
+
|`template<class Iter>`<br>`void emplace_schedule(Iter first, Iter last)`| Place a number of events in the queue in relation to `clock_type::now()`. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `schedule_in_type`.|
71
+
|`template<class Iter>`<br>`void emplace_schedule(time_point T0, Iter first, Iter last)`| Place a number of events in the queue in relation to `T0`. This overload only participates in overload resolution if `std::iterator_traits<Iter>::value_type` is `schedule_in_type`.|
72
72
73
73
|<br>Functions to perform synchronized tasks ||
74
74
|-|-|
75
-
|`template<class Re, class Func>`<br>`Re synchronize(Func&& func)`|Execute `func`, that should return `Re`, in the task queue and wait for the execution to complete. This overload only participates in overload resolution if `R` is `void`.|
76
-
|`template<class Re, class Func>`<br>`Re synchronize(Func&& func, R&& event_loop_return_value = R{})`|Execute `func`, that should return `Re`, in the task queue and wait for the execution to complete. The value returned by the event when executed in the event loop is stored in `event_loop_return_value`. This overload only participates in overload resolution if `R` is not `void`.|
75
+
|`template<class Re, class Func>`<br>`Re synchronize(Func&& func)`|Execute `func`, which should return `Re`, in the task queue and wait for the execution to complete. This overload only participates in overload resolution if `R` is `void`.|
76
+
|`template<class Re, class Func>`<br>`Re synchronize(Func&& func, R&& event_loop_return_value = R{})`|Execute `func`, which should return `Re`, in the task queue and wait for the execution to complete. The value returned by the event when executed in the event loop is stored in `event_loop_return_value`. This overload only participates in overload resolution if `R` is not `void`.|
77
77
78
78
79
79
|<br>Functions to extract events ||
@@ -87,9 +87,9 @@ A timer queue provides constant time lookup of the first event to timeout, at th
87
87
|`void shutdown()`| Shutdown the queue, leaving unprocessed events in the queue |
88
88
|`void clear()`| Removes unprocessed events from the queue |
89
89
|`void restart()`| Restarts the queue with unprocessed events intact |
90
-
|`std::size_t size() const`| Returns the number of events in queue |
90
+
|`std::size_t size() const`| Returns the number of events in the queue |
91
91
|`bool operator!() const`| Returns `true` if `shutdown()` has been called, `false` otherwise |
92
-
|`bool is_open() const`| Returns `true` if `shutdown()` has _not_ been called, `false`otherwise |
92
+
|`bool is_open() const`| Returns `true` if `shutdown()` has _not_ been called, `false`otherwise |
93
93
|`explicit operator bool() const`| Returns the same as `is_open()`|
94
94
95
95
|<br>Queue registration | Usually only used by `lyn::mq::timer_queue_registrator`|
@@ -128,7 +128,7 @@ A `timer_queue_registrator` is a RAII wrapper used to register a user (usually a
128
128
|`timer_queue_registrator(timer_queue_registrator&& other) noexcept`|A `timer_queue_registrator` is move-constructible|
0 commit comments