posted 23 years ago
The interrupt() call is not guaranteed to work. If only t1 is on a wait() call, t2 can call interrupt() to do what you want to do.
I think there is a better alternative to achieve this. Use a common resource that both threads check. t2 can set the proper condition on which t1 can return and t2 can also check the same value and return.