**heinbali01** wrote on Friday, April 29, 2016:

I modified your program:

```
/* Let the delays last 2 seconds. */
#define NOTIFICATION_TASK_PERIOD pdMS_TO_TICKS( 2000 )
```

and added some logging:

```
48.528 [ Task-2 ] Take
48.529 [ Task-1 ] Give
48.529 [ Task-1 ] Take
48.529 [ Task-2 ] Give
48.530 [ Task-2 ] Delay
48.530 [ Task-1 ] Delay
50.528 [ Task-2 ] Take
50.529 [ Task-1 ] Give
50.529 [ Task-1 ] Take
50.530 [ Task-2 ] Give
50.530 [ Task-2 ] Delay
50.530 [ Task-1 ] Delay
52.528 [ Task-2 ] Take
52.529 [ Task-1 ] Give
52.529 [ Task-1 ] Take
52.530 [ Task-2 ] Give
52.530 [ Task-2 ] Delay
52.530 [ Task-1 ] Delay
```

For me itruns fine as it is.

The delays will always last 2 seconds and (indeed) they have nothing to do with the TaskNotify calls.

Note that your code has a potential problem:

task-1 will start running first.When it uses the variable ‘xTask2’, is task-2 already started?

Otherwise I wouldn’t know a reason.