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

C#

 
GeneralRe: Regex Match counting problem [modified] Pin
User 66582-Aug-08 1:08
User 66582-Aug-08 1:08 
AnswerRe: Regex Match counting problem Pin
Gideon Engelberth2-Aug-08 2:22
Gideon Engelberth2-Aug-08 2:22 
QuestionLabel Text Pin
nelsonpaixao1-Aug-08 14:13
nelsonpaixao1-Aug-08 14:13 
AnswerRe: Label Text Pin
MarkB7771-Aug-08 14:45
MarkB7771-Aug-08 14:45 
AnswerRe: Label Text Pin
DaveyM691-Aug-08 21:13
professionalDaveyM691-Aug-08 21:13 
AnswerRe: Label Text Pin
Thomas Stockwell2-Aug-08 7:34
professionalThomas Stockwell2-Aug-08 7:34 
QuestionHow to use Queue.Synchronized Pin
JoeRip1-Aug-08 13:58
JoeRip1-Aug-08 13:58 
AnswerRe: How to use Queue.Synchronized Pin
Mark Salsbery1-Aug-08 14:27
Mark Salsbery1-Aug-08 14:27 
Once you call Synchronized(), you should use the returned wrapper
everywhere you would have used the original unsynchronized queue.
Use of the queue through the wrapper will be thread safe for all
"single operation" methods on the queue.

Make sure Synchronized() is really what you need for a thread safe queue.
Enumerating and indexing the queue aren't going to be thread safe
so you may need additional locks.

Making your own thread safe wrapper (or derived) queue class can
be better in some situations. It allows you to implement locks
the way you need to (like using a ReaderWriterLockSlim for producer/consumer
thread access) and provide properly locked enumerating methods.

Mark

Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: How to use Queue.Synchronized Pin
JoeRip1-Aug-08 15:02
JoeRip1-Aug-08 15:02 
GeneralRe: How to use Queue.Synchronized Pin
Mark Salsbery1-Aug-08 15:12
Mark Salsbery1-Aug-08 15:12 
QuestionDataGridView Navigation (i bet it´s easy) Pin
nelsonpaixao1-Aug-08 13:29
nelsonpaixao1-Aug-08 13:29 
QuestionHow do I make this code display the contents of the stack at the top of the text box.? Pin
Angelinna1-Aug-08 12:15
Angelinna1-Aug-08 12:15 
AnswerRe: How do I make this code display the contents of the stack at the top of the text box.? Pin
Guffa1-Aug-08 12:51
Guffa1-Aug-08 12:51 
GeneralRe: How do I make this code display the contents of the stack at the top of the text box.? Pin
Angelinna1-Aug-08 13:54
Angelinna1-Aug-08 13:54 
GeneralRe: How do I make this code display the contents of the stack at the top of the text box.? Pin
Lim Yuxuan1-Aug-08 17:53
Lim Yuxuan1-Aug-08 17:53 
GeneralRe: How do I make this code display the contents of the stack at the top of the text box.? Pin
Angelinna1-Aug-08 20:34
Angelinna1-Aug-08 20:34 
QuestionDesktop News Ticker Pin
wajans1-Aug-08 6:51
wajans1-Aug-08 6:51 
AnswerMessage Closed Pin
1-Aug-08 7:44
Bassam Saoud1-Aug-08 7:44 
GeneralRe: Hard drives Pin
Nish Nishant28-Oct-11 10:57
sitebuilderNish Nishant28-Oct-11 10:57 
AnswerRe: Desktop News Ticker Pin
Paul Conrad1-Aug-08 8:20
professionalPaul Conrad1-Aug-08 8:20 
GeneralRe: Desktop News Ticker Pin
wajans1-Aug-08 8:30
wajans1-Aug-08 8:30 
GeneralRe: Desktop News Ticker Pin
Paul Conrad1-Aug-08 8:34
professionalPaul Conrad1-Aug-08 8:34 
GeneralRe: Desktop News Ticker Pin
wajans1-Aug-08 9:07
wajans1-Aug-08 9:07 
GeneralRe: Desktop News Ticker Pin
nelsonpaixao1-Aug-08 13:56
nelsonpaixao1-Aug-08 13:56 
QuestionCalling a 32-bit .NET dll from a 64-bit .NET application [modified] Pin
Phil J Pearson1-Aug-08 5:29
Phil J Pearson1-Aug-08 5:29 

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.