Static constructor

Imperatorn johan_forsberg_86 at hotmail.com
Fri Jan 15 16:09:15 UTC 2021


On Friday, 15 January 2021 at 16:04:02 UTC, ludo wrote:
>> I believe so. I've never used OpenAL so it may have additional 
>> restrictions with multithreading, but from a simple "This 
>> function is only ever executed on one thread at a time", your 
>> above suggestions should work.
>>
>> Apologies for the late reply.
>
> No worry and thank you. I found the low-lock pattern on my own, 
> digging more info. Smart pattern!
> I put the synchronized function in front of the function. The 
> problem with multithreading, is the difficulty to verify that 
> it works fine :) But now the topic streams away from static 
> constructor :) Cheers

Isn't that kind of the de facto standard? Well, saw this was 7 
years ago now 😁


More information about the Digitalmars-d-learn mailing list