Switching from one thread/client to threadpool, do I need to sync internal fields?

Published: 5/10/2017
Switching from one thread/client to threadpool, do I need to sync internal fields?
Source: SOFTWAREENGINEERING.STACKEXCHANGE.COM

In my server,I am implementing a ThreadPool instead of thread per client approach: //c is an instance of Client if (!c.SetReadingInProgress()) { System.Threading.ThreadPool.QueueUserWorkItem(c.ReadData); } I am new to multithreading but I would think that this means I have to synchronize even internal fields, as more than 1 threads now can be accessing the same Client instance (object c). Is that

Read more
Related news
Comment