From d0739155d521d20151f8a0b401c586e6325babbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20BARBARAY?= Date: Wed, 3 Feb 2016 16:39:17 +0100 Subject: [PATCH] Update enqueue.md Added a note about the need to call getResponse() (or reset) when using callback and sending many requests to keep memory as low as possible --- http/Client/enqueue.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/http/Client/enqueue.md b/http/Client/enqueue.md index b5a6d75..1214996 100644 --- a/http/Client/enqueue.md +++ b/http/Client/enqueue.md @@ -3,8 +3,12 @@ Add another http\Client\Request to the request queue. If the optional callback $cb returns true, the request will be automatically dequeued. +> ***Note:*** +> The http\Client\Response object resulting from the request is always stored in an internal storage, __even__ when callback is used, because of that, the memory may grow up significantly if you send many many requests using the same http\Client instance... In that case, to keep memory as low as possible, it is advised to call http\Client::getResponse() in the callback or to call http\Client::reset() after each http\Client::send() to free some ressources. + See http\Client::dequeue() and http\Client::send(). + ## Params: * http\Client\Request $request -- 2.30.2