Click here to Skip to main content
15,891,689 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Basic Aging Algorithm for Insurance Premiums Pin
Brady Kelly19-Feb-11 4:40
Brady Kelly19-Feb-11 4:40 
GeneralRe: Basic Aging Algorithm for Insurance Premiums Pin
Roger Wright19-Feb-11 5:25
professionalRoger Wright19-Feb-11 5:25 
QuestionThreading problem Pin
Anthony Mushrow15-Feb-11 6:50
professionalAnthony Mushrow15-Feb-11 6:50 
AnswerRe: Threading problem Pin
Alan Balkany15-Feb-11 7:17
Alan Balkany15-Feb-11 7:17 
GeneralRe: Threading problem Pin
Anthony Mushrow15-Feb-11 7:36
professionalAnthony Mushrow15-Feb-11 7:36 
GeneralRe: Threading problem Pin
Alan Balkany15-Feb-11 7:41
Alan Balkany15-Feb-11 7:41 
GeneralRe: Threading problem Pin
Anthony Mushrow15-Feb-11 7:49
professionalAnthony Mushrow15-Feb-11 7:49 
GeneralRe: Threading problem Pin
Alan Balkany15-Feb-11 8:07
Alan Balkany15-Feb-11 8:07 
It's surprisingly complex for such a short fragment because of the possible interactions between threads, and the shuffling of values among four variables. Maybe it could be rewritten in a simpler way.

A useful step in analyzing code like this is identifying invariant conditions, that are guaranteed to always be true at some point in the code. But it looks like the variable shuffling makes this impossible.
GeneralRe: Threading problem Pin
Anthony Mushrow15-Feb-11 8:21
professionalAnthony Mushrow15-Feb-11 8:21 
GeneralRe: Threading problem Pin
Luc Pattyn15-Feb-11 8:57
sitebuilderLuc Pattyn15-Feb-11 8:57 
GeneralRe: Threading problem Pin
JesperMadsen12321-Feb-11 10:09
JesperMadsen12321-Feb-11 10:09 
AnswerRe: Threading problem Pin
Luc Pattyn15-Feb-11 7:57
sitebuilderLuc Pattyn15-Feb-11 7:57 
GeneralRe: Threading problem Pin
Anthony Mushrow15-Feb-11 8:10
professionalAnthony Mushrow15-Feb-11 8:10 
QuestionMerging sorted data blocks. Pin
Member 419459313-Feb-11 16:59
Member 419459313-Feb-11 16:59 
AnswerRe: Merging sorted data blocks. Pin
Luc Pattyn14-Feb-11 1:15
sitebuilderLuc Pattyn14-Feb-11 1:15 
AnswerRe: Merging sorted data blocks. Pin
Member 419459314-Feb-11 4:00
Member 419459314-Feb-11 4:00 
GeneralRe: Merging sorted data blocks. Pin
Stefan_Lang14-Feb-11 23:25
Stefan_Lang14-Feb-11 23:25 
GeneralRe: Merging sorted data blocks. Pin
Member 419459315-Feb-11 4:41
Member 419459315-Feb-11 4:41 
GeneralRe: Merging sorted data blocks. Pin
Stefan_Lang15-Feb-11 5:31
Stefan_Lang15-Feb-11 5:31 
GeneralRe: Merging sorted data blocks. Pin
Member 419459315-Feb-11 7:30
Member 419459315-Feb-11 7:30 
AnswerRe: Merging sorted data blocks. Pin
dasblinkenlight14-Feb-11 22:29
dasblinkenlight14-Feb-11 22:29 
GeneralRe: Merging sorted data blocks. Pin
Member 419459315-Feb-11 4:47
Member 419459315-Feb-11 4:47 
QuestionRe: Merging sorted data blocks. Pin
musefan15-Feb-11 6:22
musefan15-Feb-11 6:22 
AnswerRe: Merging sorted data blocks. Pin
Member 419459315-Feb-11 7:02
Member 419459315-Feb-11 7:02 
AnswerRe: Merging sorted data blocks. Pin
Eddy Vluggen17-Feb-11 7:47
professionalEddy Vluggen17-Feb-11 7:47 

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.