# is itk：：invoke Must single thread ？

**URL:** <https://discourse.itk.org/t/is-itk-invoke-must-single-thread/5770>\
**Category:** Engineering\
**Tags:** registration\
**Created:** [February 28, 2023, 1:11pm UTC](https://discourse.itk.org/t/is-itk-invoke-must-single-thread/5770 "2023-02-28T13:11:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ma1282029525](https://discourse.itk.org/user_avatar/discourse.itk.org/ma1282029525/32/3084_2.png) [@ma1282029525](https://discourse.itk.org/u/ma1282029525)\
**Post date:** [February 28, 2023, 1:11pm UTC](https://discourse.itk.org/t/is-itk-invoke-must-single-thread/5770/1 "2023-02-28T13:11:56Z")

</div>

I have a ui, and then a registration module. I start a thread in the registration module. When the registration ends, I invoke an event to be handled by the ui, but there are always some error messages.

 ![IL6XN(K$SBJ}M1(DT2JFE7U](https://discourse.itk.org/uploads/default/original/2X/8/826c47650345fe5d256d3b0102ac2ba2a09475d6.jpeg)  
 ![82K6`$0J5X8Y7GL{0OY6F9](https://discourse.itk.org/uploads/default/original/2X/1/115c863a3c4f73d5d05fcf6bc7f9fc06e28045bb.png)

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [February 28, 2023, 3:41pm UTC](https://discourse.itk.org/t/is-itk-invoke-must-single-thread/5770/2 "2023-02-28T15:41:55Z")

</div>

I think this is more of a GUI/visualization problem, than processing/ITK one. Maybe this question is better suited for [VTK forum](https://discourse.vtk.org/)?

---

<div class="post-metadata">

**Author:** ![ma1282029525](https://discourse.itk.org/user_avatar/discourse.itk.org/ma1282029525/32/3084_2.png) [@ma1282029525](https://discourse.itk.org/u/ma1282029525)\
**Post date:** [March 5, 2023, 7:45am UTC](https://discourse.itk.org/t/is-itk-invoke-must-single-thread/5770/3 "2023-03-05T07:45:36Z")

</div>

Yes, you are right. The problem is that I call the rendering of the ui thread by another sub-thread, which leads to an error in opengl
