Thread creation

This is a discussion on Thread creation within the C++ Programming forums, part of the General Programming Boards category; Can anyone share a piece of sample code for creating a process which inturns create a thread ?...

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    2

    Thread creation

    Can anyone share a piece of sample code for creating a process which inturns create a thread ?

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,505
    Well that rather depends on which OS and compiler you're using.
    Standard C++ has no such notions.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Not yet, anyway.

    Code:
    boost::thread t(threadproc);
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    Assuming windows: http://www.adrianxw.dk/SoftwareSite/index.html Look at the bottom of the page. There are three tutorials. They're very straightforward to follow, but also, as far as I know, very basic.

    EDIT: Just read the title of your post. Not sure if this is what you're looking for.
    Haha. My post count says I'm leet
    Last edited by twomers; 01-06-2007 at 07:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Object Creation in thread function
    By sl4nted in forum Windows Programming
    Replies: 18
    Last Post: 10-11-2008, 02:37 PM
  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. CreateThread ?!
    By Devil Panther in forum Windows Programming
    Replies: 13
    Last Post: 11-15-2005, 09:55 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
  5. Critical Sections, destroying
    By Hunter2 in forum Windows Programming
    Replies: 4
    Last Post: 09-02-2003, 10:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21