When you call the BeginInvoke method on a Func delegates (or the Action delegates for that matter) in C#, does the runtime use the ThreadPool or spawn a new thread?
I’m almost certain that it’ll use the ThreadPool as that’d be the logical thing to do but would appreciate it if someone could confirm this.
Thanks,
It uses the thread pool, definitely.
I’m blowed if I can find that documented anyway, mind you… this MSDN article indicates that any callback you specify will be executed on a thread-pool thread…
Here’s some code to confirm it – but of course that doesn’t confirm that it’s guaranteed to happen that way…
EDIT: As linked by Jeff below, this MSDN article confirms it: