Click here to Skip to main content
15,920,688 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionAny good way to update an object reference plus something else in a single CompareExchange? Pin
supercat925-Jul-08 8:00
supercat925-Jul-08 8:00 
AnswerRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Mike Dimmick28-Jul-08 0:47
Mike Dimmick28-Jul-08 0:47 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 5:50
supercat928-Jul-08 5:50 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Luc Pattyn28-Jul-08 7:00
sitebuilderLuc Pattyn28-Jul-08 7:00 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 9:37
supercat928-Jul-08 9:37 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
led mike28-Jul-08 9:53
led mike28-Jul-08 9:53 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Luc Pattyn28-Jul-08 10:09
sitebuilderLuc Pattyn28-Jul-08 10:09 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 15:20
supercat928-Jul-08 15:20 
Luc Pattyn wrote:
You are probably right. I still think of references as pointers, but they could be something entirely
different, and having an upper limit of 4G of them is fine by me. Although it *will* become
another 640K limit at some point in time; don't ever think we have seen the last such mistake,
things evolve a lot in 10 or 20 years time.


Actually, since it turns out the IA64 supports a 16-byte version of CompareExchange, there probably wouldn't be much need to squish object references into 32 bits. Actually, there are a number of useful things that could be done with at least some bits in an object reference (e.g. a bit to indicate whether the holder of the reference particularly wants an object to stick around; each object descriptor could then have a 'wanted' bit which be cleared once the 'wanted' bits in all references were cleared. Classes that maintain weak references could decide to drop references that were no longer 'wanted'. Such a system would avoid the problem of weakly-referenced objects surviving garbage collections that occur while a temporary live reference exists. The garbage collection could discover that an object was not 'wanted' even while a temporary live reference existed; the maintainer of the weak reference could then avoid creating any new live references in future.
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
Luc Pattyn28-Jul-08 16:05
sitebuilderLuc Pattyn28-Jul-08 16:05 
GeneralRe: Any good way to update an object reference plus something else in a single CompareExchange? Pin
supercat928-Jul-08 15:54
supercat928-Jul-08 15:54 
Questionrounding to five decimal digits Pin
CICCIOLO6924-Jul-08 22:50
CICCIOLO6924-Jul-08 22:50 
Answercross-post Pin
Luc Pattyn25-Jul-08 5:18
sitebuilderLuc Pattyn25-Jul-08 5:18 
Answer[Cross Post]Re: rounding to five decimal digits (with link to original message) Pin
Scott Dorman25-Jul-08 5:21
professionalScott Dorman25-Jul-08 5:21 
AnswerRe: rounding to five decimal digits Pin
ghle26-Jul-08 5:47
ghle26-Jul-08 5:47 
QuestionWindows Service : More than one user Service may run within the same process Pin
Krugger40424-Jul-08 21:48
Krugger40424-Jul-08 21:48 
Answer[Cross Post]Re: Windows Service : More than one user Service may run within the same process Pin
Scott Dorman25-Jul-08 4:18
professionalScott Dorman25-Jul-08 4:18 
GeneralRe: [Cross Post]Re: Windows Service : More than one user Service may run within the same process Pin
Krugger40425-Jul-08 11:01
Krugger40425-Jul-08 11:01 
GeneralRe: [Cross Post]Re: Windows Service : More than one user Service may run within the same process Pin
Scott Dorman25-Jul-08 14:15
professionalScott Dorman25-Jul-08 14:15 
QuestionPlease Clear my doubt !! Pin
guriqbal8724-Jul-08 2:37
guriqbal8724-Jul-08 2:37 
AnswerRe: Please Clear my doubt !! Pin
Luc Pattyn24-Jul-08 3:09
sitebuilderLuc Pattyn24-Jul-08 3:09 
GeneralRe: Please Clear my doubt !! Pin
guriqbal8724-Jul-08 3:27
guriqbal8724-Jul-08 3:27 
Questioninject code in .net exe files Pin
zon_cpp22-Jul-08 20:15
zon_cpp22-Jul-08 20:15 
AnswerRe: inject code in .net exe files Pin
leppie24-Jul-08 4:36
leppie24-Jul-08 4:36 
QuestionTargetting .NET 2.0 with Visual Studio 2008? Pin
Rob Caldecott22-Jul-08 5:10
Rob Caldecott22-Jul-08 5:10 
AnswerRe: Targetting .NET 2.0 with Visual Studio 2008? Pin
Mark Salsbery22-Jul-08 5:49
Mark Salsbery22-Jul-08 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.