On 05/30/2012 06:49 AM, ixid wrote:

> What happens to ref const in a multi-threaded
> environment? Is it locked by the const ref function until it has
> finished or can other threads modify it?

Yes, other threads can modify it but it would have to be marked as 'shared' to begin with. Otherwise only one thread could access it.

Then, it is still your responsibility to lock the data; but the best approach is to use message passing concurrency. I have a chapter on that:

  http://ddili.org/ders/d.en/concurrency.html

Ali

Reply via email to