This project is read-only.

Blocking of current thread

Jul 5, 2011 at 6:48 AM


I'm trying to use this library to do some indexing operations in a background thread in an ASP.Net application. What I've noticed is that SmartThreadPool does in fact run my specified process in another worker thread but it seems to block the currently executing request thread. I've tried specifying to not use the caller context or http context like so:

var start = new STPStartInfo
		UseCallerCallContext = false,
		UseCallerHttpContext = false,                        
		MaxWorkerThreads = 1
_threadPool = new SmartThreadPool(start); 

But that doesn't seem to help.

Am i just missing a constructor argument or something?

Jul 5, 2011 at 8:14 AM

DOH! sorry that is just me being stupid. Having the Visual Studio debugger enabled seems to block the other thread until you stop debugging. Running it without debugging works great.

Awesome utility BTW!