© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
16 replies
antimatter8189

❔ Threading-unsure im doing this correctly, Ui thread gets frozen.

var thread = new Thread(new ThreadStart(DelaySpashClose));

                    while (IsFileLocked())
                    {
                        if (!thread.IsAlive)
                        {
                            thread.Start();

                        }
                    }
var thread = new Thread(new ThreadStart(DelaySpashClose));

                    while (IsFileLocked())
                    {
                        if (!thread.IsAlive)
                        {
                            thread.Start();

                        }
                    }

private void DelaySpashClose()
        {
            Thread.Sleep(1000);
        }
private void DelaySpashClose()
        {
            Thread.Sleep(1000);
        }

Any Ideas?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Thread and Threading
C#CC# / help
2y ago
Threading Return to old thread
C#CC# / help
4y ago
❔ Unsure why im getting an index error with this
C#CC# / help
3y ago
Unsure on this error
C#CC# / help
3w ago