{"action":"closed","issue":{"url":"https://api.github.com/repos/petkaantonov/bluebird/issues/640","labels_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/640/labels{/name}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/640/comments","events_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/640/events","html_url":"https://github.com/petkaantonov/bluebird/issues/640","id":83925350,"number":640,"title":"Synchronous inspection doesn't work if `then()` is used?","user":{"login":"dchambers","id":283294,"avatar_url":"https://avatars.githubusercontent.com/u/283294?v=3","gravatar_id":"","url":"https://api.github.com/users/dchambers","html_url":"https://github.com/dchambers","followers_url":"https://api.github.com/users/dchambers/followers","following_url":"https://api.github.com/users/dchambers/following{/other_user}","gists_url":"https://api.github.com/users/dchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/dchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchambers/subscriptions","organizations_url":"https://api.github.com/users/dchambers/orgs","repos_url":"https://api.github.com/users/dchambers/repos","events_url":"https://api.github.com/users/dchambers/events{/privacy}","received_events_url":"https://api.github.com/users/dchambers/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-02T09:00:24Z","updated_at":"2015-06-02T13:38:58Z","closed_at":"2015-06-02T13:38:58Z","body":"When `then()` is used then synchronous-inspection doesn't seem to work by default, but I can get it to work by manually invoking any outstanding scheduled functions. Is there any reason the scheduled functions aren't automatically run when `value()` is invoked?\r\n\r\nHere is the code I used to verify this (also available in this [codepen](http://codepen.io/anon/pen/oXZXjY)):\r\n\r\n```js\r\n<script src=\"https://cdn.jsdelivr.net/bluebird/latest/bluebird.js\"></script>\r\n<script>\r\n// A\r\nconsole.log(Promise.resolve(Promise.resolve('A')).value());\r\n\r\n// B\r\nconsole.log(Promise.resolve(new Promise(function(resolve, reject) {\r\n\tresolve('B');\r\n})).value());\r\n\r\n// C1\r\ninstallScheduler();\r\nvar promise = Promise.resolve('C1').then(function(val) {\r\n\treturn val;\r\n});\r\nuninstallScheduler();\r\nconsole.log(promise.value());\r\n\r\n// C2\r\nvar promise = Promise.resolve('C2').then(function(val) {\r\n\treturn val;\r\n});\r\nconsole.log(promise.value());\r\n\r\nvar scheduledFuncs, origScheduler;\r\nfunction installScheduler() {\r\n\tscheduledFuncs = [];\r\n\torigScheduler = Promise.setScheduler(function(fn) {\r\n\t\tscheduledFuncs.push(fn);\r\n\t});\r\n}\r\n\r\nfunction uninstallScheduler() {\r\n\tfor(var fn of scheduledFuncs) {\r\n\t\tfn();\r\n\t}\r\n\tPromise.setScheduler(origScheduler);\r\n}\r\n</script>\r\n```\r\n"}}