Reader writer thread synchronization example using wait notify.