{"action":"created","issue":{"url":"https://api.github.com/repos/openthread/openthread/issues/728","repository_url":"https://api.github.com/repos/openthread/openthread","labels_url":"https://api.github.com/repos/openthread/openthread/issues/728/labels{/name}","comments_url":"https://api.github.com/repos/openthread/openthread/issues/728/comments","events_url":"https://api.github.com/repos/openthread/openthread/issues/728/events","html_url":"https://github.com/openthread/openthread/issues/728","id":180163855,"number":728,"title":"Endless Loop of Tasklets","user":{"login":"nibanks","id":20663557,"avatar_url":"https://avatars.githubusercontent.com/u/20663557?v=3","gravatar_id":"","url":"https://api.github.com/users/nibanks","html_url":"https://github.com/nibanks","followers_url":"https://api.github.com/users/nibanks/followers","following_url":"https://api.github.com/users/nibanks/following{/other_user}","gists_url":"https://api.github.com/users/nibanks/gists{/gist_id}","starred_url":"https://api.github.com/users/nibanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nibanks/subscriptions","organizations_url":"https://api.github.com/users/nibanks/orgs","repos_url":"https://api.github.com/users/nibanks/repos","events_url":"https://api.github.com/users/nibanks/events{/privacy}","received_events_url":"https://api.github.com/users/nibanks/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openthread/openthread/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"jwhui","id":16142208,"avatar_url":"https://avatars.githubusercontent.com/u/16142208?v=3","gravatar_id":"","url":"https://api.github.com/users/jwhui","html_url":"https://github.com/jwhui","followers_url":"https://api.github.com/users/jwhui/followers","following_url":"https://api.github.com/users/jwhui/following{/other_user}","gists_url":"https://api.github.com/users/jwhui/gists{/gist_id}","starred_url":"https://api.github.com/users/jwhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwhui/subscriptions","organizations_url":"https://api.github.com/users/jwhui/orgs","repos_url":"https://api.github.com/users/jwhui/repos","events_url":"https://api.github.com/users/jwhui/events{/privacy}","received_events_url":"https://api.github.com/users/jwhui/received_events","type":"User","site_admin":false},"assignees":[{"login":"jwhui","id":16142208,"avatar_url":"https://avatars.githubusercontent.com/u/16142208?v=3","gravatar_id":"","url":"https://api.github.com/users/jwhui","html_url":"https://github.com/jwhui","followers_url":"https://api.github.com/users/jwhui/followers","following_url":"https://api.github.com/users/jwhui/following{/other_user}","gists_url":"https://api.github.com/users/jwhui/gists{/gist_id}","starred_url":"https://api.github.com/users/jwhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwhui/subscriptions","organizations_url":"https://api.github.com/users/jwhui/orgs","repos_url":"https://api.github.com/users/jwhui/repos","events_url":"https://api.github.com/users/jwhui/events{/privacy}","received_events_url":"https://api.github.com/users/jwhui/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2016-09-29T21:09:54Z","updated_at":"2016-09-30T13:51:20Z","closed_at":null,"body":"I have the following code:\r\n```\r\ndo {\r\n    // Process all tasklets that were indicated to us from OpenThread\r\n    otProcessNextTasklet(pFilter->otCtx);\r\n} while (otAreTaskletsPending(pFilter->otCtx));\r\n```\r\n\r\nI have occasionally found that this gets stuck in an endless loop of processing tasklets. I haven't been able to grab it in the debugger yet, and I want to add a count and assert in DEBUG mode to assert if I hit some number of continuous executions of this loop.\r\n\r\n1. First, is this code correct? Should I be using this differently?\r\n2. What would be a good threshold to use to treat as a bug if I get more than that many tasklets to execute in a row?"},"comment":{"url":"https://api.github.com/repos/openthread/openthread/issues/comments/250749413","html_url":"https://github.com/openthread/openthread/issues/728#issuecomment-250749413","issue_url":"https://api.github.com/repos/openthread/openthread/issues/728","id":250749413,"user":{"login":"nibanks","id":20663557,"avatar_url":"https://avatars.githubusercontent.com/u/20663557?v=3","gravatar_id":"","url":"https://api.github.com/users/nibanks","html_url":"https://github.com/nibanks","followers_url":"https://api.github.com/users/nibanks/followers","following_url":"https://api.github.com/users/nibanks/following{/other_user}","gists_url":"https://api.github.com/users/nibanks/gists{/gist_id}","starred_url":"https://api.github.com/users/nibanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nibanks/subscriptions","organizations_url":"https://api.github.com/users/nibanks/orgs","repos_url":"https://api.github.com/users/nibanks/repos","events_url":"https://api.github.com/users/nibanks/events{/privacy}","received_events_url":"https://api.github.com/users/nibanks/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T13:51:20Z","updated_at":"2016-09-30T13:51:20Z","body":"I'd vote to not keep `otProcessNextTasklet` since having some clients execute tasklets differently will likely just make things harder to debug if a problem arises in this area. Also, I like the name `otProcessQueuedTasklets`."}}
{"actor":{"display_login":"nibanks"}}