Justin Stenning

Results 77 comments of Justin Stenning

Your code is async (using BeginGetScreenshot), the image is not necessarily captured immediately after CaptureImage. Either use some thread sync, or using the blocking GetScreenshot.

Going back a step, does it work with TestScreenshot at all, unchanged? If not then it could be a range of issues on the injected side (ie with the D3D...

Have not had a chance to look at this in detail yet, but can you try with a bigger node count/buffer size?

@DanielChilcott @deviousasti sorry for the late reply. I wonder if this is caused by timing out waiting for slot in full buffer? Could perhaps have used infinite timeout to workaround?

@DanielChilcott @deviousasti I think this is actually a performance related issue, if you leave the timeoutMs at the default (30s) they all succeed.

I might keep it open a little longer, the performance was not what I expected, and even without a 100ms delay there was some weirdness.

@mightypanda thanks for that information. That is an interesting behaviour, so clearly something is going on.

I think this is probably related to ThreadPool exhaustion / starvation

@deviousasti I know you found another solution, however I believe this has been fixed on the following branch: https://github.com/spazzarama/SharedMemory/tree/non-async-benchmarks Any chance you can retest? @mightypanda if you could also test...

This is the updated example - with no failures: ``` static class Program { private static async Task Main(string[] args) { // Ensure a unique channel name var rpcName =...