from a import A from b import B import threading a = A(B())