thread question....

What happens if I have a thread waiting on a resource such as a semaphore or an event flag and the current owning thread terminates?

The waiting thread will return ana error since it references a resource that no longer exists. For more information refer to Kernel Users guide.