{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/8507","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/8507/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/8507/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/8507/events","html_url":"https://github.com/JuliaLang/julia/pull/8507","id":44234813,"number":8507,"title":"Channel and RemoteChannel","user":{"login":"amitmurthy","id":117461,"avatar_url":"https://avatars.githubusercontent.com/u/117461?v=3","gravatar_id":"","url":"https://api.github.com/users/amitmurthy","html_url":"https://github.com/amitmurthy","followers_url":"https://api.github.com/users/amitmurthy/followers","following_url":"https://api.github.com/users/amitmurthy/following{/other_user}","gists_url":"https://api.github.com/users/amitmurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitmurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitmurthy/subscriptions","organizations_url":"https://api.github.com/users/amitmurthy/orgs","repos_url":"https://api.github.com/users/amitmurthy/repos","events_url":"https://api.github.com/users/amitmurthy/events{/privacy}","received_events_url":"https://api.github.com/users/amitmurthy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2014-09-28T16:32:29Z","updated_at":"2015-03-06T16:25:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/8507","html_url":"https://github.com/JuliaLang/julia/pull/8507","diff_url":"https://github.com/JuliaLang/julia/pull/8507.diff","patch_url":"https://github.com/JuliaLang/julia/pull/8507.patch"},"body":"Revisiting the idea to have support for \"channels\" in Base.\r\n\r\n- A `Channel` is used for inter-task communication. Implementation is in `task.jl` \r\n- Channels have a size, i.e., the maximum number of elements that can be `put!` without blocking. Defaults to 1. \r\n- They also have a type associated with it. Defaults to `Any`.\r\n- Channels would be a much cleaner interface for the recent `ClusterManager` interface change, where multiple tasks work in parallel totally asynchronously, unlike the `produce`/`consume` pattern which works best where both the producer and consumer work in lock-step.\r\n- `put!` blocks when a channel is full.\r\n- `take!` and `wait` block when it is empty.\r\n- `isready` denotes availability of data in the channel\r\n\r\n\r\n- `RemoteRef` has been renamed to `RemoteChannel`. Like local channels, they too have a size and type associated with it. Defaults to 1 and `Any`. Unlike a `Channel`, a `RemoteChannel` is accessible across processes. \r\n\r\nTODO:\r\n- [x] documentation\r\n- [x] more tests\r\n- [x] Change the backing object of a `RemoteChannel` to use a `Channel`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/77587587","html_url":"https://github.com/JuliaLang/julia/pull/8507#issuecomment-77587587","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/8507","id":77587587,"user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T16:25:48Z","updated_at":"2015-03-06T16:25:48Z","body":"I think this is a good idea, but I worry about how multithreading is going to affect the API. Go has a channel abstraction that is only for talking between threads in the same process. This is similar, but for talking between tasks either on the same process or across processes (potentially across a network). Do we think this model will survive as is once we have threading?"}}