This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Higher Priority task deleting a lower priority task?

I have two tasks.
task 1: searches for a string in a list of strings (n-strings are stored in the list).
task1 priority: low
task 2: invoked by uart receive interrupt to abort the search.
task 2 priority: higher than task1.

suppose i invoke task1 to search for a string from (lets say 1000) strings list.
i (as a user) get bored of the search as it is consuming a long time. Hence i send a string to uart (lets say "Abrt").
On receiving "Abrt", task2 2 is invoked.

Can task2 delete task1? (even when task1 is busy searching for the string)
will not OS generate an error.

This may seem to a very simple question, but request you to be kind enough to explain.

0