lib.py - add threading usage.