{"action":"created","issue":{"url":"https://api.github.com/repos/canjs/can-zone/issues/78","repository_url":"https://api.github.com/repos/canjs/can-zone","labels_url":"https://api.github.com/repos/canjs/can-zone/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/canjs/can-zone/issues/78/comments","events_url":"https://api.github.com/repos/canjs/can-zone/issues/78/events","html_url":"https://github.com/canjs/can-zone/issues/78","id":154894855,"number":78,"title":"setInterval","user":{"login":"gre","id":211411,"avatar_url":"https://avatars.githubusercontent.com/u/211411?v=3","gravatar_id":"","url":"https://api.github.com/users/gre","html_url":"https://github.com/gre","followers_url":"https://api.github.com/users/gre/followers","following_url":"https://api.github.com/users/gre/following{/other_user}","gists_url":"https://api.github.com/users/gre/gists{/gist_id}","starred_url":"https://api.github.com/users/gre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gre/subscriptions","organizations_url":"https://api.github.com/users/gre/orgs","repos_url":"https://api.github.com/users/gre/repos","events_url":"https://api.github.com/users/gre/events{/privacy}","received_events_url":"https://api.github.com/users/gre/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/canjs/can-zone/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-15T07:22:30Z","updated_at":"2016-05-20T16:16:47Z","closed_at":null,"body":"shouldn't setInterval be wrapped as well?"},"comment":{"url":"https://api.github.com/repos/canjs/can-zone/issues/comments/220650752","html_url":"https://github.com/canjs/can-zone/issues/78#issuecomment-220650752","issue_url":"https://api.github.com/repos/canjs/can-zone/issues/78","id":220650752,"user":{"login":"justinbmeyer","id":78602,"avatar_url":"https://avatars.githubusercontent.com/u/78602?v=3","gravatar_id":"","url":"https://api.github.com/users/justinbmeyer","html_url":"https://github.com/justinbmeyer","followers_url":"https://api.github.com/users/justinbmeyer/followers","following_url":"https://api.github.com/users/justinbmeyer/following{/other_user}","gists_url":"https://api.github.com/users/justinbmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/justinbmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinbmeyer/subscriptions","organizations_url":"https://api.github.com/users/justinbmeyer/orgs","repos_url":"https://api.github.com/users/justinbmeyer/repos","events_url":"https://api.github.com/users/justinbmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/justinbmeyer/received_events","type":"User","site_admin":false},"created_at":"2016-05-20T16:16:47Z","updated_at":"2016-05-20T16:16:47Z","body":"I'm thinking about things like your previous example:\r\n\r\n```\r\nvar count = 0;\r\n\r\nvar id = setInterval(function(){\r\n  if(count === 5) {\r\n    clearInterval(id);\r\n  }\r\n\r\n  count++;\r\n}, 500);\r\n```\r\n\r\n\r\nLots of animation libraries use `setTimeout` / `clearTimeout`.  Poorly written ones might use `setInterval` `clearInterval`.\r\n\r\nAnimations might run while the app is bootstrapping.  Maybe someone is using `setInterval` in some strange way to poll XHR (some ajax libraries polled XHR to avoid memory leaks).  \r\n\r\nMy gut tells me to watch it by default, and then let people turn it off."}}
{"actor":{"display_login":"justinbmeyer"}}