I am getting the following error after the following steps:
1. Initialiize new SockIOPool
2. Shut it down
3. Initialize another SockIOPool with the same name
System.Threading.ThreadStateException : Thread is running or terminated; it cannot restart.
If I modify the shutdown routine (SockIOPool.cs, line 1086) to null the maintenance thread:
[MethodImpl(MethodImplOptions.Synchronized)] public void Shutdown() {if(Log.IsDebugEnabled){Log.Debug(GetLocalizedString("start socket pool shutdown"));} if(_maintenanceThread !=null && _maintenanceThread.IsRunning) StopMaintenanceThread(); _maintenanceThread=null; // This is what I add // ... }
then the problem goes away.
What am I doing wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am getting the following error after the following steps:
1. Initialiize new SockIOPool
2. Shut it down
3. Initialize another SockIOPool with the same name
System.Threading.ThreadStateException : Thread is running or terminated; it cannot restart.
If I modify the shutdown routine (SockIOPool.cs, line 1086) to null the maintenance thread:
then the problem goes away.
What am I doing wrong?
Seealso: http://github.com/ben-biddington/memcacheddotnet/commit/a9e512155ebdbdd9ed0831667329d3d701d079b5