Click here to Skip to main content
15,916,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Loading 500000 rows in to a datatable Pin
Not Active30-Nov-06 20:03
mentorNot Active30-Nov-06 20:03 
GeneralRe: Loading 500000 rows in to a datatable Pin
Christian Graus30-Nov-06 22:27
protectorChristian Graus30-Nov-06 22:27 
AnswerRe: Loading 500000 rows in to a datatable Pin
Bassam Saoud30-Nov-06 19:35
Bassam Saoud30-Nov-06 19:35 
AnswerRe: Loading 500000 rows in to a datatable Pin
V.30-Nov-06 20:46
professionalV.30-Nov-06 20:46 
QuestionRunning asmx without iis Pin
pkt3030-Nov-06 17:42
pkt3030-Nov-06 17:42 
AnswerRe: Running asmx without iis Pin
Christian Graus30-Nov-06 18:02
protectorChristian Graus30-Nov-06 18:02 
QuestionAnother Thread Question (Dumb) Pin
Tristan Rhodes30-Nov-06 13:12
Tristan Rhodes30-Nov-06 13:12 
AnswerRe: Another Thread Question (Dumb) Pin
S. Senthil Kumar30-Nov-06 23:18
S. Senthil Kumar30-Nov-06 23:18 
The Catalyst wrote:
Now i was thinking that a synronous call to Read and Write would lock 'obj' and prevent two threads from
doing different things at the same time.

That's correct. Only one thread can be running the code inside Read/Write at any point in time (assuming they're sharing the locked object obj)


The Catalyst wrote:
However, while debugging an app (That i had tested with numerous multi threaded scenarios and had no problems), i found that i could have a breakpoint in Read and a breakpoint in write, and they would hit alternatively, while there was still logic to be executed in both blocks.

Where did you put the breakpoint? The breakpoint would hit the lock statement, but would block if you try to execute the thread.

The Catalyst wrote:
whether a lock is only obtained for a particular region of code, rather than the object itself.

Now that's confusing. The lock does not lock the object passed to the lock statement, it only uses the object as a kind of token to indicate the thing this thread should lock on.


Regards
Senthil [MVP - Visual C#]
_____________________________
My Blog | My Articles | WinMacro

QuestionQuestion Pin
tamerana200430-Nov-06 11:06
tamerana200430-Nov-06 11:06 
AnswerRe: Question Pin
Christian Graus30-Nov-06 11:18
protectorChristian Graus30-Nov-06 11:18 
QuestionAsking about the best way to place huge images in a ListView ? Pin
Marcos Hernandez30-Nov-06 10:11
Marcos Hernandez30-Nov-06 10:11 
AnswerRe: Asking about the best way to place huge images in a ListView ? Pin
Christian Graus30-Nov-06 11:18
protectorChristian Graus30-Nov-06 11:18 
GeneralRe: Asking about the best way to place huge images in a ListView ? Pin
Marcos Hernandez30-Nov-06 19:47
Marcos Hernandez30-Nov-06 19:47 
QuestionFunction that never returns Pin
Vega0230-Nov-06 8:46
Vega0230-Nov-06 8:46 
AnswerRe: Function that never returns Pin
Ed.Poore30-Nov-06 8:48
Ed.Poore30-Nov-06 8:48 
GeneralRe: Function that never returns Pin
Vega0230-Nov-06 9:01
Vega0230-Nov-06 9:01 
GeneralRe: Function that never returns Pin
Dave Kreskowiak30-Nov-06 9:11
mveDave Kreskowiak30-Nov-06 9:11 
GeneralRe: Function that never returns Pin
led mike30-Nov-06 11:58
led mike30-Nov-06 11:58 
GeneralRe: Function that never returns Pin
Vega0230-Nov-06 16:50
Vega0230-Nov-06 16:50 
GeneralRe: Function that never returns Pin
Ed.Poore30-Nov-06 12:06
Ed.Poore30-Nov-06 12:06 
AnswerRe: Function that never returns Pin
Pete O'Hanlon30-Nov-06 9:00
mvePete O'Hanlon30-Nov-06 9:00 
AnswerRe: Function that never returns Pin
Guffa30-Nov-06 9:11
Guffa30-Nov-06 9:11 
GeneralRe: Function that never returns Pin
Vega0230-Nov-06 9:19
Vega0230-Nov-06 9:19 
QuestionListView Select Removing SelectedItem Pin
smarttom9930-Nov-06 7:15
smarttom9930-Nov-06 7:15 
AnswerRe: ListView Select Removing SelectedItem Pin
Christian Graus30-Nov-06 8:19
protectorChristian Graus30-Nov-06 8:19 

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.