> I ran it a few times to handle the JIT but the Thread behaviour occurs in > a > loop. I suspect that the Framework is doing something funnyy eg not > mapping > 1 Thread to 1 OS thread , using lightweight objects or intializing the OS > thread by copying an existing Thread. < 5ms for a new Thread ( after the > first) seems to quick for my liking especially compared to a ThreadPool.
Just to be perfectly sure, when you say you "ran it a few times", do you mean that you started the process, took the measurements, exited the process, then ran it again? Because JIT happens once *per process invocation*. Well, technically it can be either once per process or once per AppDomain, but since an AppDomain is scoped to a process, if the process exits, all your JITted code goes away either way. Also, if you're creating threads via new Thread(), then no, the Framework is not using fibres or anything like that - it should just be creating one OS thread per CLR Thread object. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.