# How to make a lock using system.util.getGlobals()?

**URL:** <https://forum.inductiveautomation.com/t/how-to-make-a-lock-using-system-util-getglobals/96374>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [September 24, 2024, 2:31pm UTC](https://forum.inductiveautomation.com/t/how-to-make-a-lock-using-system-util-getglobals/96374 "2024-09-24T14:31:39Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 24, 2024, 3:09pm UTC](https://forum.inductiveautomation.com/t/how-to-make-a-lock-using-system-util-getglobals/96374/3 "2024-09-24T15:09:36Z")

</div>

This should get you started:

> [@Using system.util.getGlobals with classes](https://forum.inductiveautomation.com/t/using-system-util-getglobals-with-classes/78760/20):
>
> So, I was nerd-sniped pretty intensely by this yesterday, as the nesting of persistent dictionaries has some performance considerations that suggest some instance caching is appropriate. This is utterly untested, but should give you a framework to use if you decide you really don't want the latency of database storage (and I wouldn't use document tags): from threading import RLock \_g = system.util.getGlobals() # This class requires a dictionary in its constructor to # carry state. It delega…

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-make-a-lock-using-system-util-getglobals/96374)._
