Example of very simple threads synchronization