On 03/01/2015 09:47 PM, Vitalie Colosov wrote:

> global variable

A module-scope variable is thread-local by-default. Every thread will have a copy of that variable.

If you want to share data, you must define it as 'shared' (or __gshared).

> which was populated in main() function

In that case only the main thread's variable would be initialized. Shared variables should be initialized in 'shared static this()' scopes.

Ali

Reply via email to