use real-time signal, add __gc func, update tests