Click here to Skip to main content
15,902,636 members
Home / Discussions / C#
   

C#

 
QuestionRender 2d function with 16 bit resolution? Pin
Mark H Bishop2-Dec-09 14:00
Mark H Bishop2-Dec-09 14:00 
AnswerRe: Render 2d function with 16 bit resolution? Pin
Luc Pattyn2-Dec-09 14:17
sitebuilderLuc Pattyn2-Dec-09 14:17 
GeneralRe: Render 2d function with 16 bit resolution? Pin
harold aptroot2-Dec-09 22:33
harold aptroot2-Dec-09 22:33 
Generalmore thoughts Pin
Mark H Bishop3-Dec-09 3:02
Mark H Bishop3-Dec-09 3:02 
GeneralRe: more thoughts Pin
harold aptroot3-Dec-09 4:16
harold aptroot3-Dec-09 4:16 
QuestionHow do I ensure that my thread is ready before my main thread continues ? Pin
abiemann2-Dec-09 12:08
abiemann2-Dec-09 12:08 
AnswerRe: How do I ensure that my thread is ready before my main thread continues ? Pin
Luc Pattyn2-Dec-09 13:04
sitebuilderLuc Pattyn2-Dec-09 13:04 
AnswerRe: How do I ensure that my thread is ready before my main thread continues ? Pin
Alan N2-Dec-09 13:17
Alan N2-Dec-09 13:17 
Hi,
In very general terms the writing thread should wait for a ready signal from the reading thread.

void Initialise() {
  using (ManualResetEvent mre = new ManualResetEvent(false)) {
    Thread t = new Thread(ThreadProc);
    t.Start(mre);
    // continue preparing the writer
    ...
    // wait until reader thread is ready
    mre.WaitOne();
  }
}

void ThreadProc(Object mre) {
  ...
  ((ManualResetEvent)mre).Set();
  ...
  ...
}

The reader thread should signal as soon as it can and the writer should delay waiting until it is ready to write. That way the actual wait period will be minimised.

Alan.
GeneralRe: How do I ensure that my thread is ready before my main thread continues ? Pin
David Skelly2-Dec-09 22:13
David Skelly2-Dec-09 22:13 
GeneralRe: How do I ensure that my thread is ready before my main thread continues ? Pin
Nicholas Butler2-Dec-09 23:20
sitebuilderNicholas Butler2-Dec-09 23:20 
GeneralRe: How do I ensure that my thread is ready before my main thread continues ? Pin
Alan N3-Dec-09 0:41
Alan N3-Dec-09 0:41 
GeneralRe: How do I ensure that my thread is ready before my main thread continues ? Pin
David Skelly3-Dec-09 4:46
David Skelly3-Dec-09 4:46 
GeneralRe: How do I ensure that my thread is ready before my main thread continues ? Pin
abiemann4-Dec-09 19:51
abiemann4-Dec-09 19:51 
QuestionAccessing ListView edit box Pin
shoelace2-Dec-09 9:48
shoelace2-Dec-09 9:48 
Questionaccess to textbox of user control Pin
farokhian2-Dec-09 9:45
farokhian2-Dec-09 9:45 
AnswerRe: access to textbox of user control Pin
Blue_Boy2-Dec-09 9:52
Blue_Boy2-Dec-09 9:52 
GeneralRe: access to textbox of user control Pin
farokhian2-Dec-09 10:27
farokhian2-Dec-09 10:27 
GeneralRe: access to textbox of user control Pin
Saksida Bojan2-Dec-09 10:34
Saksida Bojan2-Dec-09 10:34 
GeneralRe: access to textbox of user control Pin
farokhian2-Dec-09 10:57
farokhian2-Dec-09 10:57 
GeneralRe: access to textbox of user control Pin
Saksida Bojan2-Dec-09 12:02
Saksida Bojan2-Dec-09 12:02 
Question[Message Deleted] Pin
hande542-Dec-09 8:52
hande542-Dec-09 8:52 
AnswerRe: String to datetime Pin
Blue_Boy2-Dec-09 9:05
Blue_Boy2-Dec-09 9:05 
Questiondatatable Pin
farokhian2-Dec-09 6:56
farokhian2-Dec-09 6:56 
AnswerRe: datatable Pin
Blue_Boy2-Dec-09 7:02
Blue_Boy2-Dec-09 7:02 
GeneralRe: datatable Pin
farokhian2-Dec-09 7:21
farokhian2-Dec-09 7:21 

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.