2

I am after a example of some code in powershell using the threadpool. my friends at google can not help me. Any example would be great.

Donald

Coral Doe
  • 1,925
  • 3
  • 19
  • 36
Donald
  • 471
  • 9
  • 18

1 Answers1

2

From my experience, using the threadpool in V1 crashes the session.

There is a blog post here about creating threads and includes some code.

V2 has support for background jobs and other runspaces, but that is still in CTP... Hopefully there will be more updates from PDC about the status of V2 (other than that it will be installed by default in Server 2008 R2).

Steven Murawski
  • 10,959
  • 41
  • 53
  • It is now four years later. Powershell V 2 was released in August, 2009. Powershell V 3 was released in 2012. IMO, You are more likely to be successful using the job mechanisms that Powershell provides for you than you are directly manipulating the thread mechanism, though there may be a lot of overhead. – Darin Strait Nov 01 '12 at 13:32