C
C#17mo ago
triplemocha

❔ 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.
2 Replies
Omnissiah
Omnissiah17mo ago
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
Accord
Accord17mo ago
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.
Want results from more Discord servers?
Add your server