from threading import * import cv2 class db(Thread): def run(self): for i in range(1000000000000000):# Ex loop repeace ( select * from ....)