# Use GPIOs in Multiple Threads

**URL:** <https://forum.legato.io/t/use-gpios-in-multiple-threads/6138>\
**Category:** Uncategorized\
**Created:** [March 15, 2022, 11:43am UTC](https://forum.legato.io/t/use-gpios-in-multiple-threads/6138 "2022-03-15T11:43:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reinhard](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@Reinhard](https://forum.legato.io/u/Reinhard)\
**Post date:** [March 15, 2022, 11:43am UTC](https://forum.legato.io/t/use-gpios-in-multiple-threads/6138/1 "2022-03-15T11:43:47Z")

</div>

Hey, very quick question!

I need to be able to use the GPIOs in multiple threads, calling DisconnectService & ConnectService is sadly not an option…

Is there a good workaround i can use?  
Is ditching the legato GPIO API and using sysfs a viable option in this case?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [March 15, 2022, 12:29pm UTC](https://forum.legato.io/t/use-gpios-in-multiple-threads/6138/2 "2022-03-15T12:29:06Z")

</div>

Yes, both gpio API or sysfs is ok
