TODO: how tf to make this async
Also I removed one of our break's. I don't know if I was supposed to do that or not...
I'm not sure, let me do some more research.
I think it might be why Microsoft was using CreateFile in their example, it's possible to connect your pipe to a file.
Yes, you were correct to remove the break.
It seems as though it's just not possible with
CreatePipeso you need to use
CreateNamedPipefor the one we want to read. If it's simpler, you could try leaving the other pipes use
CreatePipesince we are only interested in asynchronous behavior for the output pipe.
@time-killer-games In other words, the anonymous pipe you were using before? It was actually still a named pipe but just used the default name. Pipes are almost always backed by memory mapped files for interprocess communication. So even though you didn't realize it, because it was all abstracted away from you before, you were still in fact creating a file for the pipe!
A good example of this is how when you are using the Linux/Unix equivalents, you are working with file handles, even if you don't directly create a file. The pipe itself is a special file.
Sorry, I got sidetracked working on other things and then went to bed. I'm reading over your responses now.
@RobertBColton what do you suggest I do for this pr? I'd strongly prefer to just revert this back to fully working code, if we can't manage to find an approach you like better any time soon.
What are you talking about? This pull request was fine, all you needed to do was figure out the CreatedNamedPipe API and use the async version of ReadFile. I was waiting on you to do that.
I have no idea how to do anyone this, I can read the docs on those functions, but idk how that will tell me to do exactly what you are after. I'll try it though.
I can attempt it later if you want but I'm focusing on platforms atm.
You see the thing is, even if you put back your regular message pump you had from before, I think you are still going to hit the 4096 character limit, because you need to read while the process is running. So reverting your code is absolutely pointless here, it will just make it worse. You're better off to AT THE VERY LEAST keep the part we already fixed and just add back your message loop.
You have no other way to get around this, except the thread like I mentioned, which is even more painful than just figuring out CreateNamedPipe.
I've exceeded that many characters significantly though. I'll take your word for it. You understand that stuff a lot better than my crappy guess work and copy pasta.
@@ Coverage Diff @@ ## master #2031 +/- ## ========================================== + Coverage 30.94% 30.95% +0.01% ========================================== Files 197 197 Lines 19100 19115 +15 ========================================== + Hits 5910 5918 +8 - Misses 13190 13197 +7
|Impacted Files||Coverage Δ|