sample blocking vs nonblocking code