{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/22435","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/22435/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/22435/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/22435/events","html_url":"https://github.com/rust-lang/rust/pull/22435","id":57900148,"number":22435,"title":"Revise std::thread","user":{"login":"aturon","id":709807,"avatar_url":"https://avatars.githubusercontent.com/u/709807?v=3","gravatar_id":"","url":"https://api.github.com/users/aturon","html_url":"https://github.com/aturon","followers_url":"https://api.github.com/users/aturon/followers","following_url":"https://api.github.com/users/aturon/following{/other_user}","gists_url":"https://api.github.com/users/aturon/gists{/gist_id}","starred_url":"https://api.github.com/users/aturon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aturon/subscriptions","organizations_url":"https://api.github.com/users/aturon/orgs","repos_url":"https://api.github.com/users/aturon/repos","events_url":"https://api.github.com/users/aturon/events{/privacy}","received_events_url":"https://api.github.com/users/aturon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-02-17T09:16:03Z","updated_at":"2015-02-18T04:26:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/22435","html_url":"https://github.com/rust-lang/rust/pull/22435","diff_url":"https://github.com/rust-lang/rust/pull/22435.diff","patch_url":"https://github.com/rust-lang/rust/pull/22435.patch"},"body":"This commit makes several changes to `std::thread` in preparation for\r\nfinal stabilization:\r\n\r\n* It removes the ability to handle panics from `scoped` children; see\r\n  #20807 for discussion\r\n\r\n* It adds a `JoinHandle` structure, now returned from `spawn`, which\r\n  makes it possible to join on children that do not share data from\r\n  their parent's stack. The child is automatically detached when the\r\n  handle is dropped, and the handle cannot be copied due to Posix\r\n  semantics.\r\n\r\n* It moves all static methods from `std::thread::Thread` to free\r\n  functions in `std::thread`. This was done in part because, due to the\r\n  above changes, there are effectively no direct `Thread` constructors,\r\n  and the static methods have tended to feel a bit awkward.\r\n\r\n* Adds an `io::Result` around the `Builder` methods `scoped` and\r\n  `spawn`, making it possible to handle OS errors when creating\r\n  threads. The convenience free functions entail an unwrap.\r\n\r\n* Stabilizes the entire module. Despite the fact that the API is\r\n  changing somewhat here, this is part of a long period of baking and\r\n  the changes are addressing all known issues prior to alpha2. If\r\n  absolutely necessary, further breaking changes can be made prior to beta.\r\n\r\nCloses #20807\r\n\r\n[breaking-change]\r\n\r\nr? @alexcrichton "},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/74809864","html_url":"https://github.com/rust-lang/rust/pull/22435#issuecomment-74809864","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/22435","id":74809864,"user":{"login":"tshepang","id":588486,"avatar_url":"https://avatars.githubusercontent.com/u/588486?v=3","gravatar_id":"","url":"https://api.github.com/users/tshepang","html_url":"https://github.com/tshepang","followers_url":"https://api.github.com/users/tshepang/followers","following_url":"https://api.github.com/users/tshepang/following{/other_user}","gists_url":"https://api.github.com/users/tshepang/gists{/gist_id}","starred_url":"https://api.github.com/users/tshepang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tshepang/subscriptions","organizations_url":"https://api.github.com/users/tshepang/orgs","repos_url":"https://api.github.com/users/tshepang/repos","events_url":"https://api.github.com/users/tshepang/events{/privacy}","received_events_url":"https://api.github.com/users/tshepang/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T04:26:38Z","updated_at":"2015-02-18T04:26:38Z","body":"Since `scoped` also starts a thread, shouldn't it be a verb too... maybe something like `spawn_scoped`?"}}