Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

void Test5Thread::Main (  ) [inline, virtual]

User override function for the main execution routine of the thread. A descendent class must provide the code that will be executed in the thread within this function.

Note that the correct way for a thread to terminate is to return from this function.

Implements PThread.

Definition at line 193 of file main.cxx.

References PQueueChannel::Read(), and PThread::Sleep().

    {
      PThread::Sleep(2000);

      cout << "qchannel started" << endl;
      PINDEX i = 0;
      for (;;) {
        char buffer[29];
        if (!qchan.Read(buffer, sizeof(buffer)))
          break;
        cout << "qchan: buffer read" << endl;
        PThread::Sleep(100);
      }
      cout << "qchannel ended" << endl;
    }

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index