Vault  4.1
Public Member Functions
VForeignThread Class Reference

VForeignThread is a special case that is intended to be declared on the stack in a callback or similar function that is called by a foreign (non-VThread) source such as the Windows Service Control Manager. More...

#include <vthread.h>

Inheritance diagram for VForeignThread:
VThread

List of all members.

Public Member Functions

 VForeignThread (const VString &name)
virtual void start ()
 Starts the thread by creating whatever OS-specific resources are necessary, and invoking the thread main, resulting in the VThread subclass' run() method being called.
virtual void run ()
 Override required in each VThread subclass, run() does whatever the thread is designed to do, and returns when the thread has completed its task or detects that isRunning() returns false.

Detailed Description

VForeignThread is a special case that is intended to be declared on the stack in a callback or similar function that is called by a foreign (non-VThread) source such as the Windows Service Control Manager.

It allows you to give a name to that thread via the constructor, and it will register the current thread id with that name. This provides for getting a useful thread name (useful in VLogger output) from within that thread.

Definition at line 464 of file vthread.h.


Member Function Documentation

virtual void VForeignThread::run ( ) [inline, virtual]

Override required in each VThread subclass, run() does whatever the thread is designed to do, and returns when the thread has completed its task or detects that isRunning() returns false.

If the thread is designed to be stoppable from another thread, then its run() method must check the isRunning() property periodically and return when the property becomes false.

Implements VThread.

Definition at line 470 of file vthread.h.


The documentation for this class was generated from the following files:

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.