timeout that works without creating a new thread for every record