Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
QuestionSessions in C# Desktop Application Pin
Anil Kumar.Arvapalli30-Mar-10 20:27
Anil Kumar.Arvapalli30-Mar-10 20:27 
AnswerRe: Sessions in C# Desktop Application Pin
Khaniya30-Mar-10 20:41
professionalKhaniya30-Mar-10 20:41 
AnswerRe: Sessions in C# Desktop Application Pin
OriginalGriff30-Mar-10 22:04
mveOriginalGriff30-Mar-10 22:04 
QuestionStoring and Retrieving Image in Access Pin
Anil Kumar.Arvapalli30-Mar-10 20:24
Anil Kumar.Arvapalli30-Mar-10 20:24 
AnswerRe: Storing and Retrieving Image in Access Pin
Dan Mos30-Mar-10 21:52
Dan Mos30-Mar-10 21:52 
QuestionSynchnroization with lock statement Pin
xkrja30-Mar-10 20:23
xkrja30-Mar-10 20:23 
AnswerRe: Synchnroization with lock statement Pin
SeMartens30-Mar-10 21:26
SeMartens30-Mar-10 21:26 
GeneralRe: Synchnroization with lock statement Pin
xkrja30-Mar-10 22:10
xkrja30-Mar-10 22:10 
Thanks for the reply!

You're right. I did a test and tried it out. But is there some way around this? So while a non-changing operation is performed on the list other non-changing operations can get access to the list as well? So that only modifications to the list can be stopped while theese non-changing operations is happening to the list?

The reason is I'm creating a WCF service and each client contacts the service on a different thread. Each time a clients calls a method on the service the list is searched. This means if several hundreds of clients are connected every thread is locking the list and it takes some time to search there will be a real performance decrease.

A solution I guess is to wrap all non-changing operations in try-catch blocks and skip the lock but that seems like a real hack!

EDIT: It's a static list we're talking about in this case.

Thanks again!
GeneralRe: Synchnroization with lock statement Pin
SeMartens30-Mar-10 22:21
SeMartens30-Mar-10 22:21 
GeneralRe: Synchnroization with lock statement Pin
xkrja30-Mar-10 22:26
xkrja30-Mar-10 22:26 
QuestionProgresBar Pin
Anil Kumar.Arvapalli30-Mar-10 20:20
Anil Kumar.Arvapalli30-Mar-10 20:20 
AnswerRe: ProgresBar Pin
Khaniya30-Mar-10 20:24
professionalKhaniya30-Mar-10 20:24 
QuestionPlay sound Pin
jojoba201130-Mar-10 20:06
jojoba201130-Mar-10 20:06 
AnswerRe: Play sound Pin
Khaniya30-Mar-10 20:18
professionalKhaniya30-Mar-10 20:18 
QuestionRe: Play sound [modified] Pin
jojoba201130-Mar-10 21:10
jojoba201130-Mar-10 21:10 
AnswerRe: Play sound Pin
Kristian Sixhøj31-Mar-10 0:14
Kristian Sixhøj31-Mar-10 0:14 
QuestionXml Deserialization Pin
VCsamir30-Mar-10 19:43
VCsamir30-Mar-10 19:43 
AnswerRe: Xml Deserialization Pin
Arun Jacob30-Mar-10 20:09
Arun Jacob30-Mar-10 20:09 
GeneralRe: Xml Deserialization Pin
VCsamir30-Mar-10 21:37
VCsamir30-Mar-10 21:37 
AnswerRe: Xml Deserialization Pin
Mirko198030-Mar-10 21:43
Mirko198030-Mar-10 21:43 
GeneralRe: Xml Deserialization Pin
VCsamir4-Apr-10 20:21
VCsamir4-Apr-10 20:21 
QuestionPassing Value From One Form To Another! [modified] Pin
Sr...Frank30-Mar-10 18:22
Sr...Frank30-Mar-10 18:22 
AnswerRe: Passing Value From One Form To Another! Pin
Anubhava Dimri30-Mar-10 18:27
Anubhava Dimri30-Mar-10 18:27 
AnswerRe: Passing Value From One Form To Another! Pin
Praveen Raghuvanshi30-Mar-10 18:45
professionalPraveen Raghuvanshi30-Mar-10 18:45 
GeneralRe: Passing Value From One Form To Another! Pin
Sr...Frank30-Mar-10 18:56
Sr...Frank30-Mar-10 18:56 

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.