{"action":"created","issue":{"url":"https://api.github.com/repos/manastech/crystal/issues/1698","labels_url":"https://api.github.com/repos/manastech/crystal/issues/1698/labels{/name}","comments_url":"https://api.github.com/repos/manastech/crystal/issues/1698/comments","events_url":"https://api.github.com/repos/manastech/crystal/issues/1698/events","html_url":"https://github.com/manastech/crystal/issues/1698","id":110021140,"number":1698,"title":"[RFC] Concurrency, syntax and GC","user":{"login":"ozra","id":563674,"avatar_url":"https://avatars.githubusercontent.com/u/563674?v=3","gravatar_id":"","url":"https://api.github.com/users/ozra","html_url":"https://github.com/ozra","followers_url":"https://api.github.com/users/ozra/followers","following_url":"https://api.github.com/users/ozra/following{/other_user}","gists_url":"https://api.github.com/users/ozra/gists{/gist_id}","starred_url":"https://api.github.com/users/ozra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozra/subscriptions","organizations_url":"https://api.github.com/users/ozra/orgs","repos_url":"https://api.github.com/users/ozra/repos","events_url":"https://api.github.com/users/ozra/events{/privacy}","received_events_url":"https://api.github.com/users/ozra/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/manastech/crystal/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-10-06T14:33:55Z","updated_at":"2015-11-10T01:27:30Z","closed_at":null,"body":"This is a kind of open ended issue, touching on the subject of concurrency implementation and GC's, just felt it could be good food for thought to not get locked in a path prematurely.\r\n\r\nAt writing moment, there is just single thread concurrency in Crystal. Of course we all want multi thread. And of course we want things to be neat to use (also now).\r\n\r\nThe inspiration at the moment seems to primarily be Go for these areas.\r\n\r\nAs the prospect of a _future_ Crystal specific precise GC (eventually we'll all want that - right?) might affect how concurrency is handled (memory passing wise), I'll just drop some thoughts. \r\n\r\n* There is some criticism on Go's way of using channels - but they might mainly be because of lack of generics. In any event - _before locking things down in syntax_ perhaps some other angles of attack should (also) be considered.\r\n* Nim has a GC for each thread - a different model where _no_ \"stop the world\" ever occurs, _this requires \"nothing shared\"_ policy.\r\n* Go's latest GC effort uses multiple mark/scan threads to handle _one_ GC - there _is_ \"stop the world\" - but they're reducing the latency at expense of larger memory consumption (\"the GC knob\" setting).\r\n\r\nThat's all folks.\r\n\r\nIssues somewhat related: #1454, #688.\r\n"},"comment":{"url":"https://api.github.com/repos/manastech/crystal/issues/comments/155253581","html_url":"https://github.com/manastech/crystal/issues/1698#issuecomment-155253581","issue_url":"https://api.github.com/repos/manastech/crystal/issues/1698","id":155253581,"user":{"login":"ozra","id":563674,"avatar_url":"https://avatars.githubusercontent.com/u/563674?v=3","gravatar_id":"","url":"https://api.github.com/users/ozra","html_url":"https://github.com/ozra","followers_url":"https://api.github.com/users/ozra/followers","following_url":"https://api.github.com/users/ozra/following{/other_user}","gists_url":"https://api.github.com/users/ozra/gists{/gist_id}","starred_url":"https://api.github.com/users/ozra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozra/subscriptions","organizations_url":"https://api.github.com/users/ozra/orgs","repos_url":"https://api.github.com/users/ozra/repos","events_url":"https://api.github.com/users/ozra/events{/privacy}","received_events_url":"https://api.github.com/users/ozra/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T01:27:29Z","updated_at":"2015-11-10T01:27:29Z","body":"_I see now there were comments while I was writing my novel like monster of a comment._\r\n\r\n@waj - since libuv and Boost::ASIO is all I know of these (via node and making C++ extensions for it), and the pure C++ apps. What made it difficult to get it to work with Crystal? Seeing that libevent2 seems to be \"not that maintained\" and the fewer platforms it supports mainly.\r\n- Also, is there a particular reason for the std concurrency constructs not supporting multi threading yet? So I get the grits...\r\n\r\n@stakach - what would be the differences to the currently Crystal idiomatic concurrency constructs? Performance wise, and \"boilerplate-wise\"? \r\n"}}