Thread: Module thread Programming

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    6

    Module thread Programming

    Hi,

    Im am developing a client server simulation.
    In the simulation there will be a number of clients and servers communicating with each other.
    I want each client to run as a seperate module, like in its own thread for example.

    I was thinking of having a client class, and i would create an instance of the class for each client. Is is possible then to run each class instance in a different thread?

    thanks

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    62
    Hi Kirk.

    Multi-threading is no C++ language feature. You need to use system libraries to
    this. However, current Linux or Win32 versions have excellent multi-threading
    support. Use Google to find information about "POSIX threads" or check out the
    MSDN for CreateThread().

    PS: I am currently listening to "Harvester of Sorrow". Kirk, this was one of your
    finest work! ;-)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Terminating secondary thread from another thread
    By wssoh85 in forum C++ Programming
    Replies: 13
    Last Post: 12-19-2008, 05:14 AM
  2. Thread Prog in C language (seg fault)
    By kumars in forum C Programming
    Replies: 22
    Last Post: 10-09-2008, 01:17 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  4. pointer to main thread from worker thread?
    By draegon in forum C++ Programming
    Replies: 2
    Last Post: 10-27-2005, 06:35 AM