Writing producer and consumer application