Threading Question# DotNet - 窗口里的风景
c*o
1 楼
A situration like this:
1) Application A has 2 threads running
2) Each thread is running a public method of class B,
3) in the public method of class B, it is using an instance
of Class C to do some parsing work which takes a long time ( a few seconds)
instance of C is labeled ThreadStatic
When running on a single-CPU computer, since only one thread can run
concurrently, there is no problem. Issue comes in when running on a
quad-CPU box and 2 threads are running concurrently. The instances of
cl
1) Application A has 2 threads running
2) Each thread is running a public method of class B,
3) in the public method of class B, it is using an instance
of Class C to do some parsing work which takes a long time ( a few seconds)
instance of C is labeled ThreadStatic
When running on a single-CPU computer, since only one thread can run
concurrently, there is no problem. Issue comes in when running on a
quad-CPU box and 2 threads are running concurrently. The instances of
cl