# What does cv::startwindowthread() do?

**URL:** <https://forum.opencv.org/t/what-does-cv-startwindowthread-do/1326>\
**Category:** Uncategorized\
**Tags:** highgui\
**Created:** [February 4, 2021, 3:09am UTC](https://forum.opencv.org/t/what-does-cv-startwindowthread-do/1326 "2021-02-04T03:09:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Claudio\_C](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/claudio_c/32/320_2.png) [@Claudio\_C](https://forum.opencv.org/u/Claudio_C)\
**Post date:** [February 5, 2021, 12:44am UTC](https://forum.opencv.org/t/what-does-cv-startwindowthread-do/1326/4 "2021-02-05T00:44:15Z")

</div>

It appears to be very important in my context (Ubuntu and indeed gtk): I am putting the visualization commands in a separate thread, and I had some random opencv gui crashes that didn’t go until I inserted a `startWindowThread` where I was spawning my thread. Also, having that call makes indeed unnecessary, as you suggested, calling `waitKey`.  
So again, not at all a legacy or trivial function.

---

_[View the full topic](https://forum.opencv.org/t/what-does-cv-startwindowthread-do/1326)._
