{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1610","labels_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1610/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1610/comments","events_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1610/events","html_url":"https://github.com/jenkinsci/jenkins/pull/1610","id":63091509,"number":1610,"title":"API improvements around Executor/Executable","user":{"login":"jglick","id":154109,"avatar_url":"https://avatars.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-19T21:11:23Z","updated_at":"2015-03-24T17:56:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jenkinsci/jenkins/pulls/1610","html_url":"https://github.com/jenkinsci/jenkins/pull/1610","diff_url":"https://github.com/jenkinsci/jenkins/pull/1610.diff","patch_url":"https://github.com/jenkinsci/jenkins/pull/1610.patch"},"body":"See https://github.com/jenkinsci/workflow-plugin/pull/95 for main use cases.\r\n\r\n- [X] [JENKINS-26090](https://issues.jenkins-ci.org/browse/JENKINS-26090): `Executables.getExecutor`\r\n- ~~[JENKINS-26092](https://issues.jenkins-ci.org/browse/JENKINS-26092): `executors.jelly` interface underspecified~~\r\n- [x] [JENKINS-25938](https://issues.jenkins-ci.org/browse/JENKINS-25938): lock an `Executor` without creating a `Thread`\r\n- [x] [JENKINS-22941](https://issues.jenkins-ci.org/browse/JENKINS-22941): way to mark an `Executable` that should not block `isReadyToRestart`\r\n- [x] [JENKINS-26900](https://issues.jenkins-ci.org/browse/JENKINS-26900): hide flyweight master executor when ≥1 heavyweight executors running as subtasks\r\n\r\n@reviewbybees"},"comment":{"url":"https://api.github.com/repos/jenkinsci/jenkins/issues/comments/85621113","html_url":"https://github.com/jenkinsci/jenkins/pull/1610#issuecomment-85621113","issue_url":"https://api.github.com/repos/jenkinsci/jenkins/issues/1610","id":85621113,"user":{"login":"jglick","id":154109,"avatar_url":"https://avatars.githubusercontent.com/u/154109?v=3","gravatar_id":"","url":"https://api.github.com/users/jglick","html_url":"https://github.com/jglick","followers_url":"https://api.github.com/users/jglick/followers","following_url":"https://api.github.com/users/jglick/following{/other_user}","gists_url":"https://api.github.com/users/jglick/gists{/gist_id}","starred_url":"https://api.github.com/users/jglick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jglick/subscriptions","organizations_url":"https://api.github.com/users/jglick/orgs","repos_url":"https://api.github.com/users/jglick/repos","events_url":"https://api.github.com/users/jglick/events{/privacy}","received_events_url":"https://api.github.com/users/jglick/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T17:56:08Z","updated_at":"2015-03-24T17:56:08Z","body":"> is throwing exceptions to indicate normal behavior the only way?\r\n\r\nAdmittedly not ideal but seemed the simplest way to deal with an existing interface that defined a synchronous `void run()` method. In fact if you look at the new implementations, they start off running synchronously in the executor thread, and then _if all goes well_ they switch to asynchronous mode for the remainder of the work. The executables can still take advantage of existing infrastructure surrounding `Executor`, they just need to avoid consuming a native thread, and make some minor customizations to other behaviors."}}