Multiple threads output

The order of the output you see from this program is implementation dependent, and mostly unpredictable. It may look something like this:

-128
-127
-126
-125
-124
-123
...
125
126
127
-128
-127
-126
-125
-124
-123
...125
126
127
-128
-127
-126
-125
-124
-123
...
125
126
127

In this case the three threads run sequentially, one ofter the other. However on a few systems you may see something different


Previous | Next | Top | Cafe au Lait

Copyright 1997, 2006 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified April 26, 2006