Added daemon thread implementation.