{"action":"created","issue":{"url":"https://api.github.com/repos/functional-streams-for-scala/fs2/issues/577","repository_url":"https://api.github.com/repos/functional-streams-for-scala/fs2","labels_url":"https://api.github.com/repos/functional-streams-for-scala/fs2/issues/577/labels{/name}","comments_url":"https://api.github.com/repos/functional-streams-for-scala/fs2/issues/577/comments","events_url":"https://api.github.com/repos/functional-streams-for-scala/fs2/issues/577/events","html_url":"https://github.com/functional-streams-for-scala/fs2/pull/577","id":148243350,"number":577,"title":"implementation of io.tcp","user":{"login":"pchlupacek","id":678560,"avatar_url":"https://avatars.githubusercontent.com/u/678560?v=3","gravatar_id":"","url":"https://api.github.com/users/pchlupacek","html_url":"https://github.com/pchlupacek","followers_url":"https://api.github.com/users/pchlupacek/followers","following_url":"https://api.github.com/users/pchlupacek/following{/other_user}","gists_url":"https://api.github.com/users/pchlupacek/gists{/gist_id}","starred_url":"https://api.github.com/users/pchlupacek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchlupacek/subscriptions","organizations_url":"https://api.github.com/users/pchlupacek/orgs","repos_url":"https://api.github.com/users/pchlupacek/repos","events_url":"https://api.github.com/users/pchlupacek/events{/privacy}","received_events_url":"https://api.github.com/users/pchlupacek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-14T03:46:12Z","updated_at":"2016-04-21T16:46:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/functional-streams-for-scala/fs2/pulls/577","html_url":"https://github.com/functional-streams-for-scala/fs2/pull/577","diff_url":"https://github.com/functional-streams-for-scala/fs2/pull/577.diff","patch_url":"https://github.com/functional-streams-for-scala/fs2/pull/577.patch"},"body":"@pchiusano @mpilquist I am having troubles to get this working. the tcp.client seems to be fine. For to me unknown reasons the tcp.server is still problem. \r\n\r\nThe nature of this problem (I think) is that multiple accepts the server are in progress . Even I have made this completely serial (acceptIncoming(sch).flatMap { s => emit(s) ++ acceptIncoming(sch)}) the concurrent.njoin seems to still eagerly evaluate the appended evaluations, and I can't figure why.\r\n\r\nI know there is workaround to signal open accept and have the next attempt to  queue until the one before really accepts, but this will stockpile the requests possibly causing undesired behaviour. \r\n\r\nI will appreciate if any of you can give shot at server code... \r\n\r\nThanks. "},"comment":{"url":"https://api.github.com/repos/functional-streams-for-scala/fs2/issues/comments/213007911","html_url":"https://github.com/functional-streams-for-scala/fs2/pull/577#issuecomment-213007911","issue_url":"https://api.github.com/repos/functional-streams-for-scala/fs2/issues/577","id":213007911,"user":{"login":"pchiusano","id":11074,"avatar_url":"https://avatars.githubusercontent.com/u/11074?v=3","gravatar_id":"","url":"https://api.github.com/users/pchiusano","html_url":"https://github.com/pchiusano","followers_url":"https://api.github.com/users/pchiusano/followers","following_url":"https://api.github.com/users/pchiusano/following{/other_user}","gists_url":"https://api.github.com/users/pchiusano/gists{/gist_id}","starred_url":"https://api.github.com/users/pchiusano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchiusano/subscriptions","organizations_url":"https://api.github.com/users/pchiusano/orgs","repos_url":"https://api.github.com/users/pchiusano/repos","events_url":"https://api.github.com/users/pchiusano/events{/privacy}","received_events_url":"https://api.github.com/users/pchiusano/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T16:46:34Z","updated_at":"2016-04-21T16:46:34Z","body":"> As the concurrent.join and resources are concerned, I was kind of thinking why we just can't have the child processes evaluate independently? And as such resource safety may be leaved untouched from the normal stream interpretation? We can interrupt right? I am thinking here to evaluate only parent process tracking the open streams, open stream will be then run just as p.to(enqueue).run.run.runAsync { signalTerminationtoJoin }.`We just keep then simple signal of the open processes that will join theparent` process via wye and pipe. I'll try to draft a code to show the idea.\r\n\r\n@pchlupacek Ah, yeah I think that could be a good idea - you can't call `runAsync` (you don't have that for a general `F : Async`) but you can get the same effect with `Async.start`. Do you mind if I take a crack at this? I have a pretty good idea how it would work."}}