# Turn Multi-core Optimization Off

**URL:** <https://forum.opencv.org/t/turn-multi-core-optimization-off/370>\
**Category:** Uncategorized\
**Created:** [December 17, 2020, 8:16am UTC](https://forum.opencv.org/t/turn-multi-core-optimization-off/370 "2020-12-17T08:16:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lightbringer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/lightbringer/32/121_2.png) [@lightbringer](https://forum.opencv.org/u/lightbringer)\
**Post date:** [December 17, 2020, 8:16am UTC](https://forum.opencv.org/t/turn-multi-core-optimization-off/370/1 "2020-12-17T08:16:51Z")

</div>

How can I turn the multi-core optimization off and let the built-in OpenCV functions just to run on single core? Or how can I set number of cores to use in built-in OpenCV functions?

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [December 17, 2020, 8:37am UTC](https://forum.opencv.org/t/turn-multi-core-optimization-off/370/2 "2020-12-17T08:37:22Z")

</div>

you can [restrict the number of threads used](https://docs.opencv.org/master/db/de0/group __core__ utils.html#gae78625c3c2aa9e0b83ed31b73c6549c0) at runtime
