CORBA 2.3.3 Programmer's Guide for C++ (NonStop CORBA 2.3.3+)
Table Of Contents
- CORBA 2.3.3 Programmer's Guide for C++
- Legal Notice
- Contents
- About This Guide
- Chapter 1. Introduction to NonStop CORBA Programming
- Chapter 2. NonStop CORBA Administrative Environment
- Chapter 3. Compiling and Building an Application
- Chapter 4. Deploying a NonStop CORBA Application
- Chapter 5. Tracing and Debugging Applications
- Chapter 6. Writing Scalable Applications
- Chapter 7. Managing Transactions
- Chapter 8. Writing Multithreaded Applications
- Chapter 9. Designing Advanced Applications
- Chapter 10. Porting CORBA Applications to NonStop CORBA
- Chapter 11. Writing Wrappers for Legacy Clients and Servers
- Appendix A. Architectural Walkthrough
- Appendix B. Object References
- Appendix C. Servant Reference Counting in NonStop CORBA
- Index

vthread API provides a mutex mechanism for thread-safe programming.
NonStop CORBA provides jacket procedures for some Guardian calls, which essentially convert process-blocking calls to
thread-blocking calls. Such jacket procedures are available for some TS/MP and TMF calls. See the NonStop DCE
Application Programming Guide for more information about these jacket procedures.
●
Using the NonStop CORBA Portable Threading (vthread) API
As part of its portability and event framework, NonStop CORBA provides an object-oriented, portable application programming
interface (API) for multithreading. This API is implemented as a set of jacket procedures built upon the NonStop DCE pthread
API. With this programming interface (called vthread), you can perform the following operations:
Create a thread●
Yield control of the processor●
Wait for other threads to complete●
Cancel a thread●
Save and retrieve thread-specific data●
Also provided are two concurrency-control mechanisms: mutexes and condition variables. For mutexes, you can perform the
following operations:
Create a mutex●
Lock a mutex●
Unlock a mutex●
Test a mutex●
For condition variables, you can perform the following operations:
Create a condition variable●
Wait on a condition variable●
Signal availability of a condition variable●
Broadcast availability of a condition variable●
These operations are implemented by the Fw_Thread class, defined in the header file vthread.h in the
$NSD_ROOT/include/nsdevent product subdirectory. Refer to the NonStop CORBA 2.3 Programmer's Reference for a
detailed description of these classes and their methods.
Compaq recommends that NonStop CORBA applications use the vthread API for multithreading because it is object-oriented and
easier to use than the POSIX threading (pthread) API. However, if you require conformance to POSIX threading standards, you can
use the underlying threading implementation for the specific platform. In the OSS environment, the vthread API is built on the
NonStop DCE pthread package, which is included in the $NSD_ROOT/include directory. For detailed information about using
the pthread API, refer to the NonStop DCE Application Programming Guide.
Caution
Although you should refer to the NonStop DCE Application Programming Manual for information about the pthread API, do not
use the libraries provided by the NonStop DCE product; doing so may interfere with the operation of the NonStop CORBA ORB.
Instead, use the version of the pthread.h header file provided in the $NSD_ROOT/include directory, which includes the
pthread API and the supported jacket procedures.