Fix dead lock on inbound communication; Provides examples

Signed-off-by: Lin Gao <aoingl@gmail.com>