Added examples of blocking and non-blocking code