# Thread unsafe lazy initialization in PostActionType

**URL:** <https://meta.discourse.org/t/thread-unsafe-lazy-initialization-in-postactiontype/225447>\
**Category:** Bug\
**Created:** [April 27, 2022, 3:28pm UTC](https://meta.discourse.org/t/thread-unsafe-lazy-initialization-in-postactiontype/225447 "2022-04-27T15:28:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![eregon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eregon/32/188324_2.png) [@eregon](https://meta.discourse.org/u/eregon)\
**Post date:** [April 28, 2022, 12:08pm UTC](https://meta.discourse.org/t/thread-unsafe-lazy-initialization-in-postactiontype/225447/3 "2022-04-28T12:08:21Z")

</div>

Yes, that should work.  
Is there any reason to initialize this lazily?  
Initializing it eagerly would avoid any synchronization issue and be slightly faster to access as well as simpler.

---

_[View the full topic](https://meta.discourse.org/t/thread-unsafe-lazy-initialization-in-postactiontype/225447)._
