JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: C++ User's Guide
search filter icon
search icon

Document Information


Part I C++ Compiler

1.  The C++ Compiler

2.  Using the C++ Compiler

3.  Using the C++ Compiler Options

Part II Writing C++ Programs

4.  Language Extensions

5.  Program Organization

6.  Creating and Using Templates

7.  Compiling Templates

8.  Exception Handling

9.  Improving Program Performance

10.  Building Multithreaded Programs

10.1 Building Multithreaded Programs

10.1.1 Indicating Multithreaded Compilation

10.1.2 Using C++ Support Libraries With Threads and Signals

10.2 Using Exceptions in a Multithreaded Program

10.2.1 Thread Cancellation

10.3 Sharing C++ Standard Library Objects Between Threads

10.4 Using Classic iostreams in a Multithreading Environment

10.4.1 Organization of the MT-Safe iostream Library Public Conversion Routines Compiling and Linking With the MT-Safe libC Library MT-Safe iostream Restrictions Reducing Performance Overhead of MT-Safe Classes

10.4.2 Interface Changes to the iostream Library The New Classes The New Class Hierarchy The New Functions

10.4.3 Global and Static Data

10.4.4 Sequence Execution

10.4.5 Object Locks Class stream_locker

10.4.6 MT-Safe Classes

10.4.7 Object Destruction

10.4.8 An Example Application

10.5 Memory Barrier Intrinsics

Part III Libraries

11.  Using Libraries

12.  Using The C++ Standard Library

13.  Using the Classic iostream Library

14.  Using the Complex Arithmetic Library

15.  Building Libraries

Part IV Appendixes

A.  C++ Compiler Options

B.  Pragmas



Chapter 10

Building Multithreaded Programs

This chapter explains how to build multithreaded programs. It also discusses the use of exceptions, explains how to share C++ Standard Library objects across threads, and describes how to use classic (old) iostreams in a multithreading environment.

For more information about multithreading, see the Multithreaded Programming Guide.

See also the OpenMP API User's Guide for information on using OpenMP shared memory paralellization directives to create multithreaded programs.