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

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

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

                        }
                    }

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

Any Ideas?
Was this page helpful?