I have the following construction:

```
            Parallel.ForEach(Program.config.Root.Elements("databases"), el =>
            {
                try
                {                   
                DBConnection.OpenConnection(el.Attribute("database_alias").Value);
                }
                catch (Exception exc)
                {
                    WriteLog(10, exc);
                }
            });

```

This construction used for initial opening database connections. But by reason of 3rd party component iterations may hangs on whole application. So we improve contruction and get a new one:

```
            Parallel.ForEach(Program.config.Root.Elements("databases"), el =>
            {
                try
                {
                    System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ParameterizedThreadStart(DBConnection.OpenConnection));
                    t.Start(el.Attribute("database_alias").Value);

                    // Handling 50 seconds timeout
                    if (!t.Join(50000))
                    {
                        t.Abort();
                        // Force closing because connection is hanging with "connecting" state
                        Program.myConnections[el.Attribute("database_alias").Value].Conn.Close();                                                     
                    }                        
                }
                catch (Exception exc)
                {
                    WriteLog(10, exc);
                }
            });

```

But even now we have alive threads in time. I can see them counting amount in task manager. Does anybody knows how to manage with it?
Thanks in advance!