# Gateway Event Threads

**URL:** <https://forum.inductiveautomation.com/t/gateway-event-threads/99323>\
**Category:** General Discussion\
**Created:** [December 2, 2024, 5:43pm UTC](https://forum.inductiveautomation.com/t/gateway-event-threads/99323 "2024-12-02T17:43:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cvanremoortel](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@cvanremoortel](https://forum.inductiveautomation.com/u/cvanremoortel)\
**Post date:** [December 2, 2024, 5:43pm UTC](https://forum.inductiveautomation.com/t/gateway-event-threads/99323/1 "2024-12-02T17:43:20Z")

</div>

Are there a set number of Gateway Event Threads (like there are for tag event scripts when defined in the tag definition) or does the event trigger create a new thread? I have some timer scripts that may run long and I may use system.util.invokeAsynchronous() if it works like tag events. Thanks.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 2, 2024, 5:45pm UTC](https://forum.inductiveautomation.com/t/gateway-event-threads/99323/2 "2024-12-02T17:45:22Z")

</div>

Depends on what kind of script.

You mention timer scripts, which have a shared vs dedicated thread setting associated with them. If you configure it for dedicated then a long execution won't have an effect on other timer scripts.

---

<div class="post-metadata">

**Author:** ![cvanremoortel](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@cvanremoortel](https://forum.inductiveautomation.com/u/cvanremoortel)\
**Post date:** [December 2, 2024, 6:41pm UTC](https://forum.inductiveautomation.com/t/gateway-event-threads/99323/3 "2024-12-02T18:41:49Z")

</div>

Sorry for being imprecise. I meant Scheduled Gateway Events specifically. Timer and Message have that setting but Scheduled does not.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 2, 2024, 6:43pm UTC](https://forum.inductiveautomation.com/t/gateway-event-threads/99323/4 "2024-12-02T18:43:08Z")

</div>

Each of those scripts runs independent of the other ones. They won't block each other.

---

<div class="post-metadata">

**Author:** ![cvanremoortel](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@cvanremoortel](https://forum.inductiveautomation.com/u/cvanremoortel)\
**Post date:** [December 2, 2024, 7:05pm UTC](https://forum.inductiveautomation.com/t/gateway-event-threads/99323/5 "2024-12-02T19:05:05Z")

</div>

Thanks!
