Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with the Go runtime’s event loop #46

Open
DemiMarie opened this issue Apr 9, 2017 · 3 comments
Open

Integrate with the Go runtime’s event loop #46

DemiMarie opened this issue Apr 9, 2017 · 3 comments

Comments

@DemiMarie
Copy link

This is a feature request for integration with the Go runtime’s event loop. This would mean that operations appeared to block, but in fact did not, just like with the rest of Go.

@tmm1
Copy link

tmm1 commented Apr 13, 2017

I believe this is already the case.. all the APIs in this package block, and use channels under the hood to communicate with the completion port. The wrappers provided even conform to common golang interfaces like io.Reader and io.Writer.

@gdamore
Copy link
Contributor

gdamore commented Jun 24, 2018

I don't think this is true for the code that establishes the connection using waitNamedPIpe. Once the connection is established, read/write should behave as you indicate.

I'm not sure it would be easy to make waitNamedPipe behave like you say. But I think it would be easier and probably better to just do a sleep (e.g. 100ms) and wake loop. That should behave well with go.

@gdamore
Copy link
Contributor

gdamore commented Jun 24, 2018

My pull request #80 eliminates the use of waitNamedPipe, and so consequently should completely address this issue -- all the other uses in the code use IO completion ports sensibly to play well with the go runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants