embed ElephantBird's TaskHeartbeatThread. Might consider depend the whole lib in the future