{"action":"opened","issue":{"url":"https://api.github.com/repos/ceylon/ceylon/issues/5807","labels_url":"https://api.github.com/repos/ceylon/ceylon/issues/5807/labels{/name}","comments_url":"https://api.github.com/repos/ceylon/ceylon/issues/5807/comments","events_url":"https://api.github.com/repos/ceylon/ceylon/issues/5807/events","html_url":"https://github.com/ceylon/ceylon/issues/5807","id":121206536,"number":5807,"title":"promise.map() prevent app from terminating","user":{"login":"jpragey","id":3649259,"avatar_url":"https://avatars.githubusercontent.com/u/3649259?v=3","gravatar_id":"","url":"https://api.github.com/users/jpragey","html_url":"https://github.com/jpragey","followers_url":"https://api.github.com/users/jpragey/followers","following_url":"https://api.github.com/users/jpragey/following{/other_user}","gists_url":"https://api.github.com/users/jpragey/gists{/gist_id}","starred_url":"https://api.github.com/users/jpragey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpragey/subscriptions","organizations_url":"https://api.github.com/users/jpragey/orgs","repos_url":"https://api.github.com/users/jpragey/repos","events_url":"https://api.github.com/users/jpragey/events{/privacy}","received_events_url":"https://api.github.com/users/jpragey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-09T10:29:50Z","updated_at":"2015-12-09T10:29:50Z","closed_at":null,"body":"Hi,\r\nIn 1.2.0 on JVM, the following code doesn't stop:\r\n```ceylon\r\nshared void run() {\r\n    value deferred = Deferred<Integer>();\r\n    deferred.promise.map((Integer i)=>0 );\r\n    deferred.fulfill(0);\r\n}\r\n```\r\nI guess the cause is the underlying `ExecutionContext` never calling `Executor.shutdown()`. With a custom `ExecutionContext` explicitly `shutdown()`ing its executor, the program terminates correctly."}}