1
00:00:00,840 --> 00:00:01,980
Hello, welcome back.

2
00:00:02,010 --> 00:00:05,310
In this lesson, we shall talk about task notifications.

3
00:00:06,550 --> 00:00:14,020
Notifications allow tasks to communicate with each other directly without going through communication

4
00:00:14,020 --> 00:00:17,660
object such as Kyuss semaphores and event groups.

5
00:00:18,130 --> 00:00:20,230
That sounds awesome or even magical.

6
00:00:20,560 --> 00:00:21,940
Let's see how this is achieved.

7
00:00:22,150 --> 00:00:26,200
But before we do that, we have to know how to enable notifications.

8
00:00:26,200 --> 00:00:34,600
Like many other functions, we have to enable it in the free hour to configure what age we set the config

9
00:00:34,600 --> 00:00:42,940
use task notifications to one to to be able to use notifications in our application notifications have

10
00:00:42,940 --> 00:00:46,240
to states it can be pending or not pending.

11
00:00:47,280 --> 00:00:53,850
When a task receives a notification, its notification state is set to pending, when a task reads its

12
00:00:53,850 --> 00:00:58,270
notification value, its notification state is set to note not pending.

13
00:00:59,970 --> 00:01:08,400
So we mentioned that notifications, unlike news event groups and semaphores, can communicate with

14
00:01:08,760 --> 00:01:09,420
tasks.

15
00:01:11,140 --> 00:01:12,640
Without going through.

16
00:01:13,550 --> 00:01:16,130
This communication object, OK?

17
00:01:16,880 --> 00:01:18,110
What does this give us then?

18
00:01:18,920 --> 00:01:25,310
Notifications are faster than using Qs semaphores event groups to perform an equivalent operation.

19
00:01:26,000 --> 00:01:34,880
They also require significantly less room compared to cue's semaphores or event groups, cause if task

20
00:01:34,880 --> 00:01:42,740
one and task to need to communicate, we need not spend any memory creating a cue to pass the communication

21
00:01:42,740 --> 00:01:49,360
through the cue to send it to the cue from task one and then task to read it to the from the cue.

22
00:01:50,150 --> 00:01:57,050
We simply need to send it from task one to task to need not create an intermediary semaphore.

23
00:01:57,050 --> 00:01:59,450
To do that, we need not create event groups.

24
00:01:59,450 --> 00:01:59,960
To do that.

25
00:01:59,970 --> 00:02:03,920
We can simply send from task one to task too.

26
00:02:04,370 --> 00:02:07,330
And this is faster and this requires less room.

27
00:02:10,180 --> 00:02:16,410
Although it has some limitations, unlike Kuze semaphores and event groups, task notifications cannot

28
00:02:16,420 --> 00:02:24,130
be used to send event or data from a task to an interrupted service routine we can all send from task

29
00:02:24,130 --> 00:02:25,120
to ESR.

30
00:02:25,420 --> 00:02:32,010
However, we can send from an eyesore to a task we can send from an interrupt service routine to a task.

31
00:02:32,560 --> 00:02:39,650
Also, unlike Kyuss semaphores and event groups, task notifications can be sent to multiple tasks.

32
00:02:39,850 --> 00:02:43,150
So this is a one to one relationship with notifications.

33
00:02:43,540 --> 00:02:45,290
There is a sender and a receiver.

34
00:02:45,340 --> 00:02:46,670
There is no one to many.

35
00:02:47,510 --> 00:02:51,220
OK, so this all this an overview of notifications.

36
00:02:51,250 --> 00:02:52,960
Let's see how it works in code.

37
00:02:53,150 --> 00:02:54,540
I'll see you later of a nice.
