{"action":"opened","issue":{"url":"https://api.github.com/repos/sustrik/libdill/issues/178","repository_url":"https://api.github.com/repos/sustrik/libdill","labels_url":"https://api.github.com/repos/sustrik/libdill/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/sustrik/libdill/issues/178/comments","events_url":"https://api.github.com/repos/sustrik/libdill/issues/178/events","html_url":"https://github.com/sustrik/libdill/issues/178","id":389923809,"node_id":"MDU6SXNzdWUzODk5MjM4MDk=","number":178,"title":"Documentation and other feedback","user":{"login":"mulle-kybernetik-tv","id":38703833,"node_id":"MDQ6VXNlcjM4NzAzODMz","avatar_url":"https://avatars2.githubusercontent.com/u/38703833?v=4","gravatar_id":"","url":"https://api.github.com/users/mulle-kybernetik-tv","html_url":"https://github.com/mulle-kybernetik-tv","followers_url":"https://api.github.com/users/mulle-kybernetik-tv/followers","following_url":"https://api.github.com/users/mulle-kybernetik-tv/following{/other_user}","gists_url":"https://api.github.com/users/mulle-kybernetik-tv/gists{/gist_id}","starred_url":"https://api.github.com/users/mulle-kybernetik-tv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mulle-kybernetik-tv/subscriptions","organizations_url":"https://api.github.com/users/mulle-kybernetik-tv/orgs","repos_url":"https://api.github.com/users/mulle-kybernetik-tv/repos","events_url":"https://api.github.com/users/mulle-kybernetik-tv/events{/privacy}","received_events_url":"https://api.github.com/users/mulle-kybernetik-tv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-11T19:44:36Z","updated_at":"2018-12-11T19:44:36Z","closed_at":null,"author_association":"NONE","body":"Some feedback on my first use of libdill, so these are all newbie issues 😌 :\r\n\r\n#### It is not well explained how to use the int[2] channel you get from chmake\r\n\r\nThe examples don't help much and sometimes are even wrong like on [chdone](http://libdill.org/chdone.html):\r\n\r\n```\r\nint ch[2];\r\nchmake(ch);\r\nchsend(ch, \"ABC\", 3, -1); // should be ch[ 1]\r\nchdone(ch);                     // likely also ch[ 1] \r\n```\r\n\r\n#### There is no plain \"wait\" methods for unbundled gos\r\n\r\nIt's a bit strange, that there is no documented way to run a few coroutines and wait for them to finish. At least I couldn't discern that from the documentation. I had to use `bundle_go` to be able to use `bundle_wait`.\r\n\r\n#### It's not really clear if I can hclose a channel\r\n\r\nSince both are handles it sounds like it would be OK. It seemed `chdone( ch[1])` is what I want, but it isn't really explained what I gain/lose there.\r\n\r\n####  Compile problems\r\n\r\nIt doesn't compile with -std=c99 because of the missing `asm` keyword. It did compile when I changed those to `__asm`. `-std=gnu99` would work as well.\r\nAlso Linux needs `_POSIX_SOURCE` defined to have `sigjmp_buf` defined, also fixed by -std=gnu99.\r\n\r\n#### Why do coroutines need file descriptors ?\r\n\r\nFrom my observations I could work with ~30000 coroutines, and then things went southwards. I attribute that to max file descriptors. I don't understand though, why a coroutine needs a file descriptor and that would have been nice to read in the documentation.\r\n"}}
{"actor":{"display_login":"mulle-kybernetik-tv"}}