Click here to Skip to main content
15,887,585 members
Home / Discussions / C#
   

C#

 
GeneralRe: Skipping locked section already in use Pin
Ravi Bhavnani15-May-12 14:43
professionalRavi Bhavnani15-May-12 14:43 
GeneralRe: Skipping locked section already in use Pin
PIEBALDconsult15-May-12 14:56
mvePIEBALDconsult15-May-12 14:56 
GeneralRe: Skipping locked section already in use Pin
Ravi Bhavnani15-May-12 15:02
professionalRavi Bhavnani15-May-12 15:02 
GeneralRe: Skipping locked section already in use Pin
PIEBALDconsult15-May-12 17:21
mvePIEBALDconsult15-May-12 17:21 
GeneralRe: Skipping locked section already in use Pin
jschell16-May-12 9:04
jschell16-May-12 9:04 
GeneralRe: Skipping locked section already in use Pin
Pete O'Hanlon15-May-12 8:20
mvePete O'Hanlon15-May-12 8:20 
GeneralRe: Skipping locked section already in use Pin
Sentenryu15-May-12 8:39
Sentenryu15-May-12 8:39 
GeneralRe: Skipping locked section already in use Pin
jschell15-May-12 9:02
jschell15-May-12 9:02 
Pete O'Hanlon wrote:
The biggest problem with singletons lies in the fact that it reduces
parallelism. As you only have a single instance present, any threaded operations
must be serialized in and out of the singleton, reducing the efficiency of the
threading. They can also make it harder to unit test code because it can
introduce global state.


I don't agree.

The biggest problem with singletons is incorrect usage and from that overusage.

For your points...

For the first problem sometime the very nature of the need dictates serialization anyways. And in other cases there are ways that can allow multiple access.

As for the second problem there are trivial solutions for most problems of that nature, for example just implementing a Reset() method.
GeneralRe: Skipping locked section already in use Pin
Pete O'Hanlon15-May-12 21:43
mvePete O'Hanlon15-May-12 21:43 
GeneralRe: Skipping locked section already in use Pin
jschell16-May-12 9:07
jschell16-May-12 9:07 
GeneralRe: Skipping locked section already in use Pin
BobJanova16-May-12 0:39
BobJanova16-May-12 0:39 
Questioncollapsing xml elements into attributes in c# Pin
swjam15-May-12 2:26
swjam15-May-12 2:26 
AnswerRe: collapsing xml elements into attributes in c# Pin
Pete O'Hanlon15-May-12 2:31
mvePete O'Hanlon15-May-12 2:31 
GeneralRe: collapsing xml elements into attributes in c# Pin
swjam15-May-12 2:49
swjam15-May-12 2:49 
GeneralRe: collapsing xml elements into attributes in c# Pin
Pete O'Hanlon15-May-12 2:51
mvePete O'Hanlon15-May-12 2:51 
AnswerRe: collapsing xml elements into attributes in c# Pin
PIEBALDconsult15-May-12 3:35
mvePIEBALDconsult15-May-12 3:35 
JokeRe: collapsing xml elements into attributes in c# Pin
swjam15-May-12 4:39
swjam15-May-12 4:39 
GeneralRe: collapsing xml elements into attributes in c# Pin
Dave Kreskowiak15-May-12 5:02
mveDave Kreskowiak15-May-12 5:02 
GeneralRe: collapsing xml elements into attributes in c# Pin
PIEBALDconsult15-May-12 5:37
mvePIEBALDconsult15-May-12 5:37 
GeneralRe: collapsing xml elements into attributes in c# Pin
Dave Kreskowiak15-May-12 7:26
mveDave Kreskowiak15-May-12 7:26 
GeneralRe: collapsing xml elements into attributes in c# Pin
PIEBALDconsult15-May-12 5:38
mvePIEBALDconsult15-May-12 5:38 
GeneralRe: collapsing xml elements into attributes in c# Pin
Mycroft Holmes15-May-12 14:28
professionalMycroft Holmes15-May-12 14:28 
GeneralRe: collapsing xml elements into attributes in c# Pin
PIEBALDconsult15-May-12 14:34
mvePIEBALDconsult15-May-12 14:34 
QuestionRedirecting output from an unmanaged dll Pin
andreas0414-May-12 23:19
andreas0414-May-12 23:19 
AnswerRe: Redirecting output from an unmanaged dll Pin
BobJanova15-May-12 0:27
BobJanova15-May-12 0:27 

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.