{"action":"opened","issue":{"url":"https://api.github.com/repos/crcn/mesh.js/issues/205","labels_url":"https://api.github.com/repos/crcn/mesh.js/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/crcn/mesh.js/issues/205/comments","events_url":"https://api.github.com/repos/crcn/mesh.js/issues/205/events","html_url":"https://github.com/crcn/mesh.js/issues/205","id":110733664,"number":205,"title":"add back-pressure","user":{"login":"crcn","id":757408,"avatar_url":"https://avatars.githubusercontent.com/u/757408?v=3","gravatar_id":"","url":"https://api.github.com/users/crcn","html_url":"https://github.com/crcn","followers_url":"https://api.github.com/users/crcn/followers","following_url":"https://api.github.com/users/crcn/following{/other_user}","gists_url":"https://api.github.com/users/crcn/gists{/gist_id}","starred_url":"https://api.github.com/users/crcn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crcn/subscriptions","organizations_url":"https://api.github.com/users/crcn/orgs","repos_url":"https://api.github.com/users/crcn/repos","events_url":"https://api.github.com/users/crcn/events{/privacy}","received_events_url":"https://api.github.com/users/crcn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/crcn/mesh.js/labels/feature","name":"feature","color":"009800"},{"url":"https://api.github.com/repos/crcn/mesh.js/labels/high%20priority","name":"high priority","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-09T20:50:35Z","updated_at":"2015-10-09T20:50:35Z","closed_at":null,"body":"basically this:\r\n\r\n```javascript\r\nvar readable = new AsyncResponse(function(writable) {\r\n  // then() is called when read() is called (reader is able to receive chunk)\r\n  writable.write(\"chunk\").then(function() {\r\n  \r\n  });\r\n\r\n  // this is also doable, but will create back-pressure\r\n  writable.write(\"chunk\");\r\n  writable.write(\"chunk\"); // stored in mem\r\n});\r\n\r\n// signal writable that it can write another chunk\r\nreadable.read().then(function() {\r\n\r\n});\r\n```\r\n\r\n"}}