| 54 | { |
| 55 | public: |
| 56 | pipe_example( |
| 57 | ) : |
| 58 | message_pipe(4) // This 4 here is the size of our message_pipe. The significance is that |
| 59 | // if you try to enqueue more than 4 messages onto the pipe then enqueue() will |
| 60 | // block until there is room. |
| 61 | { |
| 62 | // start the thread |
| 63 | start(); |
| 64 | } |
| 65 | |
| 66 | ~pipe_example ( |
| 67 | ) |