mirror of https://github.com/ARMmbed/mbed-os.git
Update README.md
parent
c73413893f
commit
06b7ba0a55
|
@ -75,7 +75,7 @@ queue.call_every(400, printf, "called every 0.4 seconds\n");
|
||||||
|
|
||||||
The call functions return an ID that uniquely represents the event in the
|
The call functions return an ID that uniquely represents the event in the
|
||||||
the event queue. You can pass this ID to `EventQueue::cancel` to cancel
|
the event queue. You can pass this ID to `EventQueue::cancel` to cancel
|
||||||
an in-flight event.
|
an in-flight event prior to dispatch.
|
||||||
|
|
||||||
``` cpp
|
``` cpp
|
||||||
// The event id uniquely represents the event in the queue
|
// The event id uniquely represents the event in the queue
|
||||||
|
@ -88,7 +88,7 @@ if (id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Events can be cancelled as long as they have not been dispatched. If the
|
// Events can be cancelled as long as they have not been dispatched. If the
|
||||||
// event has already expired, cancel has no side-effects.
|
// event has already expired, cancel may have negative side-effects.
|
||||||
queue.cancel(id);
|
queue.cancel(id);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ int enet_consume(void *buffer, int size) {
|
||||||
```
|
```
|
||||||
|
|
||||||
Additionally, in-flight events can be cancelled with `equeue_cancel`. Events
|
Additionally, in-flight events can be cancelled with `equeue_cancel`. Events
|
||||||
are given unique ids on post, allowing safe cancellation of expired events.
|
are given unique ids on post, allowing safe cancellation until dispatch.
|
||||||
|
|
||||||
``` c
|
``` c
|
||||||
#include "equeue.h"
|
#include "equeue.h"
|
||||||
|
|
Loading…
Reference in New Issue