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

Use Windows pipes for input readiness notification #2263

Merged
merged 7 commits into from
Oct 14, 2021

Conversation

dankamongmen
Copy link
Owner

Our new event subsystem relies on pipes for readiness testing. On Windows, this means CreatePipe() and HANDLEs. #2244

@dankamongmen dankamongmen force-pushed the dankamongmen/windows-pipes branch from bb5c2ec to f1148ac Compare October 12, 2021 09:00
@dankamongmen dankamongmen force-pushed the dankamongmen/windows-pipes branch from f1148ac to f93faee Compare October 12, 2021 09:17
@WSLUser
Copy link

WSLUser commented Oct 12, 2021

Do you need WIndows pipes if you use AF_Unix?
https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/

@dankamongmen dankamongmen force-pushed the dankamongmen/windows-pipes branch from 6ca801f to 4a3d021 Compare October 14, 2021 03:15
@dankamongmen dankamongmen added NOMERGE not ready for merge mswindows microsoft windows labels Oct 14, 2021
@dankamongmen
Copy link
Owner Author

i just went and tested this, and it breaks initialization (on windows). so don't merge it yet.

@dankamongmen dankamongmen removed the NOMERGE not ready for merge label Oct 14, 2021
@dankamongmen
Copy link
Owner Author

ok, got it working

@dankamongmen dankamongmen merged commit 245f9f8 into master Oct 14, 2021
@dankamongmen dankamongmen deleted the dankamongmen/windows-pipes branch October 14, 2021 04:02
@dankamongmen
Copy link
Owner Author

AF_UNIX @WSLUser is more heavyweight than a pipe on both platforms. no need to dive into a namespace. =]

@WSLUser
Copy link

WSLUser commented Oct 14, 2021

I was thinking that before WSL2 was created, a TCP/IP pipe was needed for Docker to integrate with WSL1. When AF_Unix came out, eventually that was also provided as an option, and was a better integration than the pipe. Based on this, I was considering that notcurses might get into a similar position for Windows but if you get better perf using a pipe, i'm all for it.

dankamongmen added a commit that referenced this pull request Oct 16, 2021
* [heuristics] GNU screen 4x never has rgb

* [BitmapSmoothMove] only WARN in test until sixel supports this #2258

* add minimal example for #2266

* contour: enable sextants

* interp PoC: clean up ncvisual #2266

* ncselector_options: constify string arguments

* Constify strings in selector/mselector_items

Use internal types to track items within the
selector/mselector widgets, rather than pressing the
user-provided item structs into double-duty. With this
change, we can constify the strings within those
user-provided items. Do so, also removing the internal-side
elements. Update documentation. Closes #2267.

* constify ncmenu_item/_section strings

* Use Windows pipes for input readiness notification (#2263)

* [windows] use CreatePipe for input #2244
* [input] read and write to Windows readiness handles #2244
* inputready_fd: not on windows, alas

* for now, if it's on windows, it's windows terminal #2248

* tabbed janitorial work

clean up memory leak of tab names
ignore NCTYPE_RELEASE in tabbed PoC
constify strings in nctabbed_options

* notcurses-demo FPS graph: back to straight seconds

* [info] expand some emoji into proper literals

* drop textplay PoC

* remove poc for issue #2266

* constify ncselector_item reference fix #2270

* [ncplayer] restore pause functionality with NCTYPE_RELEASE

* stop pushing termtype to interrogate_terminfo

* menu PoC: ignore NCTYPE_RELEASE

* properly name Windows Terminal

* [windows] HANDLE, not PHANDLE

* ncvisual_render -> ncvisual_blit (core/test) #1462

* ncvisual_render -> ncvisual_blit (docs)

* ncvisual_render -> ncvisual_blit (nctetris)

* [keller] fix up for ncvisual_blit() #1462

* stacking tests: ncvisual_render() -> ncvisual_blit() #1462

* all PoCs: ncvisual_render -> ncvisual_blit #1462

* restore ncvisual_inflate(), for now

* pixel PoC / ncneofetch -> ncvisual_blit() #1462

* notcurses-info: ncvisual_blit, inline all emoji #1462

* rotate PoCpp: ncvisual_blit() #1462

* xray/grid: ncvisual_blit() #1462

* remove last instances of ncvisual_render() #1462

* remove old-style notcurses_ rendering functions

Make notcurses_render() a static inline wrapper around
ncpile_render(). Remove the deprecated
notcurses_render_to_file() and ncpile_render_to_file().
ABI3 work #1777.

* ncstrwidth() becomes static inline wrapper #1777

* remove deprecated ncvisual_subtitle()

* kill ncvisual_inflate(), long deprecated #1777

* remove deprecated palette256 wrappers #1777

* kill ncplane_new() #1777

* remove deprecated renderfp field from notcurses_options #1777

* reorder ncstats fields to match documentation #1777

* kill deprecated style functions #1777

* ncplane_move{top, bottom} become static inline #1777

* fix up move_above()/move_below() #1777

* ncplane_pixelgeom -> ncplane_pixel_geom() #1777

* ncstyle functions ought return uint16_t #1777 #2200

* ncvisualplane_create: provide new pile functionality #1462

* introduce ncvisual_blit() #1462

* reduce ncvisual_render() to wrapper around ncvisual_blit() #1462

* convert most ncvisual_render()s to ncvisual_blit() #1642

Co-authored-by: joseLuís <joseluis@andamira.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mswindows microsoft windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants