{"action":"created","issue":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/126","labels_url":"https://api.github.com/repos/flux-framework/flux-core/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/flux-framework/flux-core/issues/126/comments","events_url":"https://api.github.com/repos/flux-framework/flux-core/issues/126/events","html_url":"https://github.com/flux-framework/flux-core/issues/126","id":53069600,"number":126,"title":"synchronous RPCs block the flux reactor","user":{"login":"garlick","id":169947,"avatar_url":"https://avatars.githubusercontent.com/u/169947?v=3","gravatar_id":"","url":"https://api.github.com/users/garlick","html_url":"https://github.com/garlick","followers_url":"https://api.github.com/users/garlick/followers","following_url":"https://api.github.com/users/garlick/following{/other_user}","gists_url":"https://api.github.com/users/garlick/gists{/gist_id}","starred_url":"https://api.github.com/users/garlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlick/subscriptions","organizations_url":"https://api.github.com/users/garlick/orgs","repos_url":"https://api.github.com/users/garlick/repos","events_url":"https://api.github.com/users/garlick/events{/privacy}","received_events_url":"https://api.github.com/users/garlick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2014-12-29T20:35:01Z","updated_at":"2015-02-10T23:42:43Z","closed_at":null,"body":"`flux_json_rpc()`, and calls based on it, like say `kvs_get()` to name one of many, send a request then block until a response is received.\r\n\r\nIn reactor based programs, this means other events cannot be handled during the RPC and that thread effectively stalls while the RPC is pending.\r\n\r\nIn once sense this is a feature, e.g. a call like `kvs_get()` or `kvs_commit()` is effectively atomic from the perspective of the caller.  However it also creates several practical problems:\r\n* if the reactor is handling signals, say SIGINT, a reactor-based utility blocked in an RPC cannot be terminated with CTRL-C.\r\n* higher priority messages such as a shutdown event cannot be handled\r\n* we have to do some trickery in the RPC code to requeue responses in the handle that are not the one upon which we are synchronously blocked\r\n\r\nShould there be a scheme for telling the handle/reactor what messages are higher priority than an RPC response and when they arrive, have the RPC return with EINTR?"},"comment":{"url":"https://api.github.com/repos/flux-framework/flux-core/issues/comments/73808675","html_url":"https://github.com/flux-framework/flux-core/issues/126#issuecomment-73808675","issue_url":"https://api.github.com/repos/flux-framework/flux-core/issues/126","id":73808675,"user":{"login":"garlick","id":169947,"avatar_url":"https://avatars.githubusercontent.com/u/169947?v=3","gravatar_id":"","url":"https://api.github.com/users/garlick","html_url":"https://github.com/garlick","followers_url":"https://api.github.com/users/garlick/followers","following_url":"https://api.github.com/users/garlick/following{/other_user}","gists_url":"https://api.github.com/users/garlick/gists{/gist_id}","starred_url":"https://api.github.com/users/garlick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garlick/subscriptions","organizations_url":"https://api.github.com/users/garlick/orgs","repos_url":"https://api.github.com/users/garlick/repos","events_url":"https://api.github.com/users/garlick/events{/privacy}","received_events_url":"https://api.github.com/users/garlick/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T23:42:43Z","updated_at":"2015-02-10T23:42:43Z","body":"On language bindings,  I just wanted to be careful in my parochial view not to let C's lack of a concurrency model limit what might be possible in languages that do have interesting models.  Please keep me in line!\r\n"}}