add generic_generator, which has yield_send/receive methods for communication between caller and generator.