CreateThreadExample -- creating threads in two different ways: Each of these threads carries out its own sequence of commands, oblivious to the other. They interact only indirectly, by sharing the same text area for output.

The source.