❔ What is causing my new thread to run slow?
Here's my code. I'm playing a song with System.Beep while throwing random 'character-sized pixels' to the screen with a font size of 1 and full screen. This is pure C# with a console utility library I'm building with some P/Invoking of the Windows API. But I'm always curious why when I'm setting the font size really small the beep song plays slower. It's its own thread, so I don't see why it matters how tiny the "pixels" are. When at font size of 24, the song plays beautifully. When at 1, it starts to crawl. It's like the thread isn't fully independent. Note I'm just trying to learn from why the created thread is behaving as such for academic reasons.
https://www.paste.org/125720
Paste code - paste.org
www.paste.org - allows users to paste snippets of text, usually samples of source code, for public viewing. A place where lack of code gets binned; sharing code iterations since 2006.
3 Replies
A screenshot in full screen so you have an idea. The song gets slower and slower as it progresses. The placing of the "pixels" do not slow down in the main thread.
wouldn't Beep method be resolved into conhost? even it being in a different thread would cause some "disruption"
i'm investigating`
no i doubt it is a conhost api
although there is a second Beep method you could use
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.