{"comment":{"url":"https://api.github.com/repos/fatcerberus/duktape/comments/16363396","html_url":"https://github.com/fatcerberus/duktape/commit/640fd4ddfc8cbcf777628d788da7c64a206d4c6b#commitcomment-16363396","id":16363396,"user":{"login":"svaarala","id":6377415,"avatar_url":"https://avatars.githubusercontent.com/u/6377415?v=3","gravatar_id":"","url":"https://api.github.com/users/svaarala","html_url":"https://github.com/svaarala","followers_url":"https://api.github.com/users/svaarala/followers","following_url":"https://api.github.com/users/svaarala/following{/other_user}","gists_url":"https://api.github.com/users/svaarala/gists{/gist_id}","starred_url":"https://api.github.com/users/svaarala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svaarala/subscriptions","organizations_url":"https://api.github.com/users/svaarala/orgs","repos_url":"https://api.github.com/users/svaarala/repos","events_url":"https://api.github.com/users/svaarala/events{/privacy}","received_events_url":"https://api.github.com/users/svaarala/received_events","type":"User","site_admin":false},"position":14,"line":14,"path":"website/api/duk_debugger_pause.yaml","commit_id":"640fd4ddfc8cbcf777628d788da7c64a206d4c6b","created_at":"2016-02-26T21:23:56Z","updated_at":"2016-02-26T21:23:56Z","body":"Hmm, for me it's quite logical: from a technical perspective this API call is a request to \"pause as soon as possible\", and if nothing is running, \"as soon as possible\" is when something starts executing. Even when something is running it may take 20 seconds (or 20 minutes, if we're running a native function which takes 20 minutes to complete) for the pause to take effect, for example.\r\n\r\nSo not sure if it would actually be easier to understand if the \"eventual pause\" would sometimes be guaranteed (when something is running) and sometimes not (when something is not running right now). Anyway, fixing the behavior to be a no-op when nothing is running might not be trivial, especially since there's pressure to relax threading requirements in which case there might be an entirely unrelated thread which is running (but suspended) and we have no easy way to detect that via `ctx` (since it'll be another context entirely)."}}