Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
AnswerRe: Exam preparation Pin
AspDotNetDev22-Apr-10 11:12
protectorAspDotNetDev22-Apr-10 11:12 
AnswerRe: Exam preparation Pin
William Winner22-Apr-10 12:23
William Winner22-Apr-10 12:23 
AnswerRe: Exam preparation Pin
PIEBALDconsult22-Apr-10 13:05
mvePIEBALDconsult22-Apr-10 13:05 
AnswerRe: Exam preparation Pin
yu-jian22-Apr-10 15:42
yu-jian22-Apr-10 15:42 
GeneralRe: Exam preparation Pin
Peace ON22-Apr-10 22:09
Peace ON22-Apr-10 22:09 
AnswerRe: Exam preparation Pin
Peace ON22-Apr-10 22:07
Peace ON22-Apr-10 22:07 
GeneralRe: Exam preparation Pin
netJP12L23-Apr-10 4:43
netJP12L23-Apr-10 4:43 
Questioncomments? Pin
Megidolaon22-Apr-10 10:46
Megidolaon22-Apr-10 10:46 
AnswerRe: comments? Pin
Luc Pattyn22-Apr-10 11:05
sitebuilderLuc Pattyn22-Apr-10 11:05 
AnswerRe: comments? Pin
AspDotNetDev22-Apr-10 11:09
protectorAspDotNetDev22-Apr-10 11:09 
AnswerRe: comments? Pin
hammerstein0522-Apr-10 11:26
hammerstein0522-Apr-10 11:26 
AnswerRe: comments? Pin
Gregory Gadow22-Apr-10 11:50
Gregory Gadow22-Apr-10 11:50 
AnswerRe: comments? Pin
Abhinav S22-Apr-10 16:41
Abhinav S22-Apr-10 16:41 
AnswerRe: comments? Pin
Megidolaon23-Apr-10 4:01
Megidolaon23-Apr-10 4:01 
AnswerRe: comments? Pin
Alan Balkany23-Apr-10 4:09
Alan Balkany23-Apr-10 4:09 
QuestionConnecting to RFID Reader Pin
Member 407767222-Apr-10 10:25
Member 407767222-Apr-10 10:25 
AnswerRe: Connecting to RFID Reader Pin
Migounette22-Apr-10 10:30
Migounette22-Apr-10 10:30 
GeneralRe: Connecting to RFID Reader Pin
Member 407767223-Apr-10 4:34
Member 407767223-Apr-10 4:34 
GeneralRe: Connecting to RFID Reader Pin
Migounette23-Apr-10 6:49
Migounette23-Apr-10 6:49 
QuestionDataList doesn't go into Edit mode correctly Pin
MWRivera22-Apr-10 8:54
MWRivera22-Apr-10 8:54 
QuestionDataGridView-Database in csharp smart device Pin
Tunisien8622-Apr-10 6:14
Tunisien8622-Apr-10 6:14 
AnswerRe: DataGridView-Database in csharp smart device Pin
Dan Mos22-Apr-10 7:55
Dan Mos22-Apr-10 7:55 
GeneralRe: DataGridView-Database in csharp smart device Pin
Tunisien8623-Apr-10 10:00
Tunisien8623-Apr-10 10:00 
QuestionThread Sync Query Pin
AmitDey22-Apr-10 5:09
AmitDey22-Apr-10 5:09 
AnswerRe: Thread Sync Query Pin
Luc Pattyn22-Apr-10 5:18
sitebuilderLuc Pattyn22-Apr-10 5:18 
Hi,

you could create two threads, one looping the reads, the other the writes; then the arrays need to be handed over from one thread to the other, an easy way to do so is with a Queue. If you need lots of arrays and they all are same size, same type, you could skip creating and garbage collecting them by creating a pool of arrays, holding them in an "empty queue", so the reader would get one from there, fill it, pass it thru the other queue; and the writer would get a filled array, write it out, and stuff the array in the "empty queue" again.

[ADDED]
Forgot to mention the obvious: you need some synchronization mechanism for this to work properly; have a look at the lock statement.
[/ADDED]

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Prolific encyclopedia fixture proof-reader browser patron addict?
We all depend on the beast below.


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.