Re: Garbage collection problem with generators

2016-12-28 Thread Haochuan Guo
n Wed, Dec 28, 2016 at 9:03 PM, Haochuan Guo > wrote: > > Anyone? The script to reproduce this problem is in: > > > > https://gist.github.com/wooparadog/766f8007d4ef1227f283f1b040f102ef > > > > On Fri, Dec 23, 2016 at 8:39 PM Haochuan Guo > wrote: > &g

Re: Garbage collection problem with generators

2016-12-28 Thread Haochuan Guo
Anyone? The script to reproduce this problem is in: https://gist.github.com/wooparadog/766f8007d4ef1227f283f1b040f102ef On Fri, Dec 23, 2016 at 8:39 PM Haochuan Guo wrote: > Hi, everyone > > I'm building a http long polling client for our company's discovery > servi

Garbage collection problem with generators

2016-12-23 Thread Haochuan Guo
Hi, everyone I'm building a http long polling client for our company's discovery service and something weird happened in the following code: ```python while True: try: r = requests.get("url", stream=True, timeout=3) for data in r.iter_lines(): processing_data...