# Threads with standalone program

**URL:** <https://root-forum.cern.ch/t/threads-with-standalone-program/5642>\
**Category:** ROOT\
**Created:** [November 16, 2007, 1:44pm UTC](https://root-forum.cern.ch/t/threads-with-standalone-program/5642 "2007-11-16T13:44:18Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![matthieuguillo](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/c6cbf5/32.png) [@matthieuguillo](https://root-forum.cern.ch/u/matthieuguillo)\
**Post date:** [November 16, 2007, 1:44pm UTC](https://root-forum.cern.ch/t/threads-with-standalone-program/5642/1 "2007-11-16T13:44:18Z")

</div>

Hello Rooters

I am trying to build a standalone C++ program (that is, that contains a “main”) wich compute some quantities and use ROOT graphics to display results as the computation goes.

Unfortunately, I cannot interact with ROOT Canvas while the main program is running. I have attached a small example to show the problem.

There is an example in ROOT ( root/test/threads.cxx ) using TThreads to solve this problem but I was wondering if there was not an easier way.

Thanks  
[main.cxx](https://root-forum.cern.ch/uploads/default/original/2X/c/cc561d13f1c0d80057b5245c7026bd908e415b17.cxx) (2.19 KB)

---

_[View the full topic](https://root-forum.cern.ch/t/threads-with-standalone-program/5642)._
