Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Keep running after main function returns.

Name: Anonymous 2007-11-01 8:32

In case of event driven programs, i usually don't want to do anything in the main thread (except init, and start the other threads ofc). The problem is, that the program exits when the main function ends.

I usually do a while(true) Sleep() to make the main function go on forever, but that's not quite... elegant. Is there a proper solution for this problem?

Name: Anonymous 2007-11-01 8:37

pthread_join (or equivalent operation) the other threads before returning. This will block the main thread until all other threads die.

Name: Anonymous 2007-11-01 8:43

waitUntilFinished() in that disgusting coffee language.

Name: Anonymous 2007-11-01 9:12

>>2
DONT HELP HIM!!!!!!!

Name: Anonymous 2007-11-01 14:52

main function should be your event handler loop

Name: Anonymous 2007-11-01 16:18

use GOTO. works everytime.

Name: Anonymous 2007-11-01 23:10

       ,.. -ェ‐=、‐-、 _,rェ┐
   rーv'彡rf/f゙!l゙!ミ、ヾ、三'ォ
   |三ヲ ( !.{f.l|{.}.!l |゙!、l、!i"≦
   l三i ( | |l |!|l !| l !!」」`ヾヲ
   7Z. ヽfヽ⌒ , ⌒jメ、
    ̄   ~ゝ 、ワ / < ITT: NIGGERS
     ,.‐、-t}. `"ヒr-、,,_
   /´⌒´ヽゝ ── 'ヽ⌒ヽ
  /   ィ   ,  ヽ  , )` `ヽ
 /    ノ^  ー   '` ー 'ヽ   ゙i           
..ノ  ,,,ノ            Y´゙  )         
(   < |             !  /         
 ヽ_  \           ノ_/
   ヽ、__ ヽ.ー     @  ノ  ソ、
     〈J .〉  ヾ、.::;;;;;;::.ノ |ヽ-´
     /""     ;ミシミッ  .|
     レ    .イ、_ωノ  .リ
    .,ゝ    ,ノ   |  ' ヽ ノ
   / ` レリ  i´   リ
   i    /    `、   i'
    〉  イ      〉  |
   /  ::|      (_ヽ \、
  (。mnノ       `ヽ、_nm

Name: Anonymous 2007-11-02 10:37

Hint: return from the main() function twice.

Name: Anonymous 2010-12-06 10:04

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-17 1:31

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2010-12-17 1:33

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-03 0:36

Don't change these.
Name: Email:
Entire Thread Thread List