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

BOOL PQueueChannel::Close (  ) [virtual]

Close the file channel.

Returns:
TRUE if close was OK.

Reimplemented from PChannel.

Definition at line 108 of file qchannel.cxx.

References PChannel::IsOpen(), PChannel::os_handle, PSemaphore::Signal(), PSync::Signal(), and PSync::Wait().

Referenced by Open(), and ~PQueueChannel().

{
  if (!IsOpen())
    return FALSE;

  mutex.Wait();
  if (queueBuffer != NULL)
    delete [] queueBuffer;
  queueBuffer = NULL;
  os_handle = -1;
  mutex.Signal();
  unempty.Signal();
  unfull.Signal();
  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index