| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: threads, threads, more threads |
-=> Quoting Craig Swanson to Jon Guthrie <=- > You didn't completely read what I wrote. I wrote "semaphore or some > other mechanism" where some other mechanism could include atomic > instructions. As Mr. Fitzsimmons points out, the operations in question aren't necessarily atomic. However, they will still work because it doesn't matter. > You should declare that thread_finished variable as volatile so that > the compiler will not optimize out the read of the memory location at > which the variable is stored. You are, of course, correct. It doesn't help to have a flag variable that isn't ever going to be tested. --- Blue Wave/Max v2.12 OS/2 [NR]* Origin: The Round Table, BBS of Gulf Coast Mensa (1:106/1393) SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 106/1393 9030 2000 449 116 170/400 280/1 396/1 3615/50 @PATH: 229/2 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.