TaskCreationOptions.LongRunning option and ThreadPool

Solution 1:

Yes, LongRunning forces the creation of a new thread outside the pool. Here's some pseudo-disassembled code from the latest framework version:

...
if (task.Options HasFlag LongRunning) then
    create new Thread thread
    thread.Start(task)
...

Edit: converted from ugly C# to pseudocode.

Solution 2:

Presumably you can check this by using "Thread.IsThreadPoolThread":

http://msdn.microsoft.com/en-us/library/system.threading.thread.isthreadpoolthread.aspx