I& #39;m not sure that I fully
understand this thread function...