Generator as gen_server