Blocking of current thread asp.net

Jul 5, 2011 at 5:48 AM

Hi, 

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 7: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!