Using Threads
This section uses a simple example to introduce and explain the concepts and classes involved in creating threads. You can find more examples in buildspace/examples/package-name. The following list gives the names of those examples and the classes and functions that they exercise:
activobj:
RWThreadFunction,
RWRunnableFunction,
RWRunnableServer,
RWTRunnableIOUFunction,
RWTThreadIOUFunction attrtest:
RWRunnableSelf,
RWThread,
RWThreadAttribute,
RWThreadFunction balance:
RWRunnableTrap cancella:
RWThreadFunction,
RWRunnableSelf,
RWCancellation hello_g:
RWThreadFunction hello_m:
RWThreadFunction interupt:
RWThreadFunction,
RWRunnableSelf,
RWCancellation iouescro:
RWThreadFunction,
RWRunnableSelf ioureslt:
RWTThreadIOUFunction,
RWRunnableSelf ioutrap:
RWThreadFunction,
RWTThreadIOUFunction,
RWRunnableSelf prodcons:
RWThreadFunction,
RWRunnableSelf,
RWRunnableTrap rnbltrap:
RWThreadFunction,
RWRunnableTrap,
RWRunnableSelf servpool:
RWTRunnableIOUFunction,
RWRunnableSelf,
RWServerPool thrcreat:
RWThreadFunction,
RWRunnableSelf threadid:
RWThreadFunction,
RWRunnableSelf,
RWRunnableTrap thrlocal:
RWThreadFunction,
RWRunnableSelf,
RWTThreadLocal,
RWRunnableTrap thrstate:
RWThreadFunction,
RWRunnableSelf,
RWCancellation The scope and completeness of some examples in this guide are limited to ensure readability and satisfy size constraints. For this reason, you should also review the example programs distributed with the Threading package. See the appendix on file locations in the Building Your Applications document (rcbbd) for the exact location of the examples for your build.