Example of cooperative threads