lock.py: thread lock operation.
simple script for sniffer.py