1multithreading_support(3)            Coin            multithreading_support(3)
2
3
4

NAME

6       multithreading_support - Multithreading Support in Coin
7
8       The support in Coin for using multiple threads in application programs
9       and the Coin library itself, consists of two main features:
10
11       • Coin provides platform-independent thread-handling abstraction
12         classes. These are classes that the application programmer can freely
13         use in her application code to start new threads, control their
14         execution, work with mutexes and do other tasks related to handling
15         multiple threads.
16       The classes in question are SbThread, SbMutex, SbStorage, SbBarrier,
17       SbCondVar, SbFifo, SbThreadAutoLock, SbRWMutex, and SbTypedStorage. See
18       their respective documentation for the detailed information.
19       The classes fully hides the system-specific implementation, which is
20       either done on top of native Win32 (if on Microsoft Windows), or over
21       POSIX threads (on UNIX and UNIX-like systems).
22       • The other aspect of our multi-threading support is that Coin can be
23         specially configured so that rendering traversals of the scene graph
24         are done in a thread-safe manner. This means e.g. that it is possible
25         to have Coin render the scene in parallel on multiple CPUs for
26         multiple rendering pipes, to better take advantage of such high-end
27         systems (like CAVE environments, for instance).
28       Thread-safe render traversals are off by default, because there is a
29       small overhead involved which would make rendering (very) slightly
30       slower on single-threaded invocations.
31       To get a Coin library built with thread-safe rendering, one must
32       actively re-configure Coin and build a special, local version. For
33       configure-based builds (UNIX and UNIX-like systems, or with Cygwin on
34       Microsoft Windows) this is done with the option '--enable-threadsafe'
35       to Autoconf configure. To change the configuration and re-build with
36       Visual Studio, you will need to change the preprocessor directive
37       COIN_THREADSAFE to defined in the file src/setup.h located in the same
38       folder as you found your solution file.
39       There are some restrictions and other issues which it is important to
40       be aware of:
41       • We do not yet provide any support for binding the multi-threaded
42         rendering support into the SoQt / SoWin / etc GUI bindings, and
43         neither do we provide bindings against any specific library that
44         handles multi-pipe rendering. This means the application programmer
45         will have to possess some expertise, and put in some effort, to be
46         able to utilize multi-pipe rendering with Coin.
47       • Rendering traversals is currently the only operation which we
48         publicly support to be thread-safe. There are other aspects of Coin
49         that we know are thread-safe, like most other action traversals
50         beside just rendering, but we make no guarantees in this regard.
51       • Be careful about using a separate thread for changing Coin structures
52         versus what is used for the application's GUI event thread.
53       We are aware of at least issues with Qt3 (and thereby SoQt), where you
54       should not modify the scene graph in any way in a thread separate from
55       the main Qt thread. This because it will trigger operations where Qt3
56       is not thread-safe. For Qt4, we have not been aware of such problems.
57       Since
58           Coin 2.0
59Version 4.0.0              Wed Jul 19 2023 00:00:00  multithreading_support(3)
Impressum