named-pipe-wrapper
named-pipe-wrapper copied to clipboard
High CPU Usage
Hi,
I have a client in a WindowsService which does the following:
var client = new NamedPipeClient<string>("my-pipe");
client.Start();
The UI application acts as the server:
var server = new NamedPipeServer<string>("my-pipe");
server.ClientMessage += OnClientMessage;
server.Start();
Problem: If my UI application is closed the CPU Usage goes up to 100% on one core. I guess this is due a missing sleep where the client tries to connect to the server.
Greetings thaxy
Edit: This Issue was fixed with this https://github.com/reliablehosting/named-pipe-wrapper/commit/f7267a4ce0a76e25b7a9f5203d6e0d95dfd497cb commit in this pull request https://github.com/acdvorak/named-pipe-wrapper/pull/3 I hope that acdvorak will update this with his own code. His syntax and knowledge is awesome.
@thaxy Maybe email @acdvorak about this issue since he has been mia on the project for so long. His email is in his profile.
@davidgrupp thanks for the reply. But I guess @acdvorak already seen this issue and is too busy with other projects/work. I will let this Issue open, maybe he finds the time in the future.
@thaxy well if you (or anyone else) needs the change it looks like https://github.com/reliablehosting/named-pipe-wrapper has the fix applied (they also created the PR). You can just clone that repo and compile from source to get a working build. Best of luck!
You just confirmed what I wrote in my edited original post. But I'm fine with that if this makes it clearer.