

.. _example_compute_in_thread:

Compute in thread example
--------------------------------------------

This script demonstrates how one can do a computation in another thread
and update the mayavi pipeline. It also shows how to create a numpy array
data and visualize it as image data using a few modules.

.. image:: ../generated_images/example_compute_in_thread.jpg
    :align: center



**Python source code:** :download:`compute_in_thread.py`

.. literalinclude:: compute_in_thread.py
    :lines: 7-


    