Thread overview | |||||
---|---|---|---|---|---|
|
September 30, 2013 static this () executed multiple times | ||||
---|---|---|---|---|
| ||||
Hi, I have a module level static this() that I thought should be executed only once per pogram run. However, in my case it is executed 13 times. Question is - is this a normal behavior that I should work with or is there something wrong going on? Thanks, Martin |
September 30, 2013 Re: static this () executed multiple times | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Drasar | Is your program using threads? I believe static this is run once per thread, with shared static this being the once per program one. |
September 30, 2013 Re: static this () executed multiple times | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | On 30.9.2013 18:12, Adam D. Ruppe wrote:
> Is your program using threads? I believe static this is run once per thread, with shared static this being the once per program one.
Yup, that did the trick. Thanks.
Martin
|
Copyright © 1999-2021 by the D Language Foundation