{"action":"opened","issue":{"url":"https://api.github.com/repos/cybozu/libyrmcds/issues/8","labels_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/8/comments","events_url":"https://api.github.com/repos/cybozu/libyrmcds/issues/8/events","html_url":"https://github.com/cybozu/libyrmcds/issues/8","id":55360014,"number":8,"title":"Clean way to shutdown the receiver thread?","user":{"login":"kazuho","id":41567,"avatar_url":"https://avatars.githubusercontent.com/u/41567?v=3","gravatar_id":"","url":"https://api.github.com/users/kazuho","html_url":"https://github.com/kazuho","followers_url":"https://api.github.com/users/kazuho/followers","following_url":"https://api.github.com/users/kazuho/following{/other_user}","gists_url":"https://api.github.com/users/kazuho/gists{/gist_id}","starred_url":"https://api.github.com/users/kazuho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kazuho/subscriptions","organizations_url":"https://api.github.com/users/kazuho/orgs","repos_url":"https://api.github.com/users/kazuho/repos","events_url":"https://api.github.com/users/kazuho/events{/privacy}","received_events_url":"https://api.github.com/users/kazuho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-24T05:49:16Z","updated_at":"2015-01-24T05:49:16Z","closed_at":null,"body":"README.md states:\r\n> Although the socket used in libyrmcds is blocking, receiving results from the server is separated from the sending operations. You can even use a different thread to receive results asynchronously.\r\n\r\nThe design seems elegant and seems to work like a charm.  However it seems like that there is no way to gracefully shutdown the receiver thread.\r\n\r\nIMO, `yrmcds_recv` function should return when `recv(2)` returns `EINTR` (presumably with an error code like `YRMCDS_INTERRUPTED`), so that applications can do whatever they want."}}