[HELP- MultiThreading] Unity5.2.2f1 unable to do MultiThreading?

This is my situtation:

I am delveoping a MMO rpg server in Unity5.2.2f1.

I need to operate mysql in Unity asynchronously so as not to block the main thread who’s doing job to let NetworkServer listening incoming message from server port. Which is to ciritcally to be blocked by DB operation.

This is my code:

/// 
/// Starts the async connection.
/// </summary>
public void StartAsyncConnection()
{
	isConnecting = true;
	workerThread = new Thread(new ThreadStart(DoConn));
	workerThread.IsBackground = true;
	workerThread.Priority = ThreadPriority.Highest;
	workerThread.Start();
	UnityEngine.Debug.LogFormat("@StartAsyncConnection, workerThread is alive:{0}, thread state:{1}" , workerThread.IsAlive , workerThread.ThreadState);
}

void CreateDBConnection (string conn)
{
	UnityEngine.Debug.Log("@CreateDBConnection!");
	try
	{
		MySqlConnection mysqlConnection = new MySqlConnection (conn);
		mysqlConnection.Open ();
		this.dbConnection = mysqlConnection;
		this.dbCommand = this.dbConnection.CreateCommand();
		UnityEngine.Debug.Log("@CreateDBConnection finish!");
	}
	catch(Exception exc)
	{
		this.dbConnection = null;
		this.dbCommand = null;
		UnityEngine.Debug.LogException(exc, PooledDAOBehaviour.instance);
	}
}

It’s quit simple, just opening a mySQLConnection in a thread.

Problem is, unity engines seems to kill every thread of mine as soon as they Start().

The thread state is:
Started → WaitSleepJoin → Stoped

I believe it has something to do with UnityEngine, why disallowing multithreading regardless the thread’s work has nothing to do with any Unity API call ?

i figure out what happen :
The thread does work, but the UnityEngine.Debug.Log API DOES NOT work outside the main thread, that’s why the log isn’t printed.

However this only occurs after I compile to OS X App , the unity editor is ok to have log printed outside of Main Thread. Really error prone !!!

Have you tried changing your UnityEngine.Debug.Log() statements to UnityEngine.Info.Log()?