|
Shared variables are locked when accessed. This is needed so that changes to the data can be written and read properly. There is no concept of 'read-only' for shared variables. Without knowing more, I think you should investigate having the main thread feed the work data to the threads using queues. |