Fixed deadlock issue of rwlock test

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>