| | |
Is variable++ 1 atomic action?
Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
![]() |
By its definition, the postfix increment operator has to use temporary storage so that it can return the pre-incremented value. You can think of it like this:
Optimizations can make it close to atomic for all cases of built-in types, or atomic for some cases of some built-in types, but in the general case, it's not gonna happen.
operator++ temp = self; self = self + 1; return temp;
![]() |
Similar Threads
- RPG Battle Action (Python)
- 'Object variable or With block variable not set' Error (ASP.NET)
- server problems? passing variable info... (ASP)
- variable Initialisation in JSP (JSP)
- Session variable (ASP.NET)
- using variable for dynamic from elements (JavaScript / DHTML / AJAX)
Other Threads in the Computer Science Forum
- Previous Thread: Which one to choose?
- Next Thread: Passing Variables/Parameters - By Ref/Value?
| Thread Tools | Search this Thread |
ai algorithm algorithms amazon assignment assignmenthelp automata battery binary bittorrent bizarre bletchleypark blogging bomb business cern codebreaker compiler computer computers computerscience computertrackingsoftware connect conversion csc data dataanalysis dataintepretation development dfa dissertation dissertations dissertationthesis dissertationtopic ebook employment energy extensions floatingpoint foreclosure foreclosuresoftware fuel gadgets geeks givemetehcodez government graphics hardware history homeowners homeworkassignment humor ibm idea ideas internet iphone ipod itcontracts jobs kindle laser laws lsmeans marketing mining mobileapplication msaccess nano netbeans networking news os piracy piratebay principles programming rasterizer research sam-being-cute sas science security sex spying sql stephenfry study supercomputer supercomputing sweden technology textfield turing turingtest two'scompliment uk virus warehouse ww2





