Click here to Skip to main content
15,914,014 members
Home / Discussions / C#
   

C#

 
GeneralRe: overload operator + Pin
OriginalGriff15-Apr-09 4:08
mveOriginalGriff15-Apr-09 4:08 
GeneralRe: overload operator + Pin
DaveyM6915-Apr-09 4:39
professionalDaveyM6915-Apr-09 4:39 
GeneralRe: overload operator + Pin
OriginalGriff15-Apr-09 5:10
mveOriginalGriff15-Apr-09 5:10 
Questionretrieve object multiple return with different types question? Pin
michaellu8815-Apr-09 2:14
michaellu8815-Apr-09 2:14 
AnswerRe: retrieve object multiple return with different types question? Pin
0x3c015-Apr-09 2:24
0x3c015-Apr-09 2:24 
GeneralRe: retrieve object multiple return with different types question? Pin
michaellu8815-Apr-09 15:14
michaellu8815-Apr-09 15:14 
Questionjoin Pin
sheemap15-Apr-09 1:40
sheemap15-Apr-09 1:40 
GeneralRe: join Pin
Pete O'Hanlon15-Apr-09 1:43
mvePete O'Hanlon15-Apr-09 1:43 
GeneralRe: join Pin
sheemap15-Apr-09 1:47
sheemap15-Apr-09 1:47 
GeneralRe: join Pin
Luc 64801115-Apr-09 2:02
Luc 64801115-Apr-09 2:02 
GeneralRe: join Pin
EliottA15-Apr-09 3:13
EliottA15-Apr-09 3:13 
GeneralRe: join Pin
0x3c015-Apr-09 4:30
0x3c015-Apr-09 4:30 
RantRe: join Pin
musefan15-Apr-09 2:34
musefan15-Apr-09 2:34 
AnswerRe: join Pin
tom57200715-Apr-09 2:53
tom57200715-Apr-09 2:53 
Questionproblem in setting backround image to a form created using OpenGL in c# Pin
raesa15-Apr-09 1:34
raesa15-Apr-09 1:34 
Questionhow to write string in PDF Pin
wasimsharp15-Apr-09 1:10
wasimsharp15-Apr-09 1:10 
AnswerRe: how to write string in PDF Pin
stancrm15-Apr-09 1:18
stancrm15-Apr-09 1:18 
GeneralRe: how to write string in PDF Pin
wasimsharp15-Apr-09 18:23
wasimsharp15-Apr-09 18:23 
AnswerRe: how to write string in PDF Pin
tom57200715-Apr-09 2:56
tom57200715-Apr-09 2:56 
Questionmultithreading: lock (static) function library Pin
rpm820015-Apr-09 0:58
rpm820015-Apr-09 0:58 
AnswerRe: multithreading: lock (static) function library Pin
Moreno Airoldi15-Apr-09 3:22
Moreno Airoldi15-Apr-09 3:22 
AnswerRe: multithreading: lock (static) function library Pin
PIEBALDconsult15-Apr-09 6:29
mvePIEBALDconsult15-Apr-09 6:29 
rpm8200 wrote:
I need to make sure that my static function library is locked if one of the threads executes read or write operations


It's my understanding that static methods are always thread safe. That if thread 1 is executing Read then thread 2 will have to wait if it calls Read.

If you want thread 2 to wait if it calls Write while thread 1 is executing Read, then simply create an object to lock on:

private static readonly object lockme = new object() ;


Then in each of your methods:

lock ( lockme ) { ... }


I don't think I've ever had to do that in static methods, but I expect it will work.
GeneralRe: multithreading: lock (static) function library Pin
rpm820015-Apr-09 22:56
rpm820015-Apr-09 22:56 
QuestionSQL Script Pin
kibromg15-Apr-09 0:54
kibromg15-Apr-09 0:54 
AnswerRe: SQL Script Pin
tom57200715-Apr-09 0:57
tom57200715-Apr-09 0:57 

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.