Hello, welcome back.
In this lesson, we shall talk about task notifications.
Notifications allow tasks to communicate with each other directly without going through communication
object such as Kyuss semaphores and event groups.
That sounds awesome or even magical.
Let's see how this is achieved.
But before we do that, we have to know how to enable notifications.
Like many other functions, we have to enable it in the free hour to configure what age we set the config
use task notifications to one to to be able to use notifications in our application notifications have
to states it can be pending or not pending.
When a task receives a notification, its notification state is set to pending, when a task reads its
notification value, its notification state is set to note not pending.
So we mentioned that notifications, unlike news event groups and semaphores, can communicate with
tasks.
Without going through.
This communication object, OK?
What does this give us then?
Notifications are faster than using Qs semaphores event groups to perform an equivalent operation.
They also require significantly less room compared to cue's semaphores or event groups, cause if task
one and task to need to communicate, we need not spend any memory creating a cue to pass the communication
through the cue to send it to the cue from task one and then task to read it to the from the cue.
We simply need to send it from task one to task to need not create an intermediary semaphore.
To do that, we need not create event groups.
To do that.
We can simply send from task one to task too.
And this is faster and this requires less room.
Although it has some limitations, unlike Kuze semaphores and event groups, task notifications cannot
be used to send event or data from a task to an interrupted service routine we can all send from task
to ESR.
However, we can send from an eyesore to a task we can send from an interrupt service routine to a task.
Also, unlike Kyuss semaphores and event groups, task notifications can be sent to multiple tasks.
So this is a one to one relationship with notifications.
There is a sender and a receiver.
There is no one to many.
OK, so this all this an overview of notifications.
Let's see how it works in code.
I'll see you later of a nice.