Some work on threads, mutex and chunk mechanism