Added the examples of use  of threads