July 01, 2014 Re: Thread-safety and lazy-initialization of libraries | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sergey Protko | On Monday, 30 June 2014 at 20:53:25 UTC, Sergey Protko wrote:
>
> Is there any proper way to do on-demand lazy-initialization of used library, which will be also thread-safe? How do i need to handle cases where some methods, which requires library to be initialized, called from different threads at the same time?
pthread_once comes to mind.
|
Copyright © 1999-2021 by the D Language Foundation