change: afd_loop api must take a timeout argument. this changes can be reduce cost of context switch.