# Main Display scale in worker thread

**URL:** <https://forum.juce.com/t/main-display-scale-in-worker-thread/15516>\
**Category:** General JUCE discussion\
**Created:** [September 11, 2015, 3:42pm UTC](https://forum.juce.com/t/main-display-scale-in-worker-thread/15516 "2015-09-11T15:42:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [September 11, 2015, 3:42pm UTC](https://forum.juce.com/t/main-display-scale-in-worker-thread/15516/1 "2015-09-11T15:42:28Z")

</div>

Hi Jules,

&nbsp;

When loading some resource in a worker thread, I would like to get the current display scale. (in order to know if I load retina assets or not)

Currently if I call&nbsp;Desktop::Displays::getMainDisplay() in another thread to get this scale, I got an assert.

&nbsp;

Is this assert mandatory, or some locking would help avoiding it ?

&nbsp;

Thanks,

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [September 11, 2015, 4:20pm UTC](https://forum.juce.com/t/main-display-scale-in-worker-thread/15516/2 "2015-09-11T16:20:07Z")

</div>

The display structure could be updated at any time by the message thread, so you'd need to use a MessageManagerLock to read it safely.

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [September 11, 2015, 4:39pm UTC](https://forum.juce.com/t/main-display-scale-in-worker-thread/15516/3 "2015-09-11T16:39:21Z")

</div>

oki doki

&nbsp;

Thanks !
