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

C#

 
GeneralRe: image converting Pin
Heath Stewart29-Dec-04 8:59
protectorHeath Stewart29-Dec-04 8:59 
GeneralRe: image converting Pin
Charlie Williams29-Dec-04 7:58
Charlie Williams29-Dec-04 7:58 
Generala thread question Pin
cchere29-Dec-04 4:20
cchere29-Dec-04 4:20 
GeneralRe: a thread question Pin
Tom Larsen29-Dec-04 4:36
Tom Larsen29-Dec-04 4:36 
GeneralRe: a thread question Pin
cchere29-Dec-04 5:30
cchere29-Dec-04 5:30 
GeneralRe: a thread question Pin
Member 161799929-Dec-04 6:51
Member 161799929-Dec-04 6:51 
GeneralRe: a thread question Pin
cchere29-Dec-04 7:15
cchere29-Dec-04 7:15 
GeneralRe: a thread question Pin
Tom Larsen29-Dec-04 10:39
Tom Larsen29-Dec-04 10:39 
It should be noted that Windows is not a realtime OS and .Net is not a realtime API framework and will not respond properly if you need true realtime behavior in your threading and processing. If you need true realtime behavior you need to find another system.

Beyond this, without actually knowing percisely what you are trying to do I can only guess as to what to do or are trying to do. If you need to save perodically use a custom built threaded queue or use ThreadPool to spawn new threads to save data. You don't want to suspend saving in the middle or you'll have messed up data in the context before and after the suspend which means that this will break any realtime response.

As for using Application.Idle:

private void idle(object sender,EventArgs e)
{
    System.Threading.ThreadPool.QueueUserWorkItem(new WaitCallback(SaveStuff), stuff))
}

private static void SaveStuff(object state)
{
    SaveStateStuff stuff = state as SaveStateStuff;
    stuff.Save();
}


* this assumes SaveStateStuff is MT safe.
GeneralVector-Based Application Pin
el_zeeyed29-Dec-04 3:21
el_zeeyed29-Dec-04 3:21 
GeneralRe: Vector-Based Application Pin
Heath Stewart29-Dec-04 9:10
protectorHeath Stewart29-Dec-04 9:10 
GeneralAsynchronous socket programming - threading design question Pin
Adam Goossens29-Dec-04 2:31
Adam Goossens29-Dec-04 2:31 
GeneralRe: Asynchronous socket programming - threading design question Pin
Robert Rohde29-Dec-04 2:40
Robert Rohde29-Dec-04 2:40 
GeneralRe: Asynchronous socket programming - threading design question Pin
Stefan Troschuetz29-Dec-04 7:36
Stefan Troschuetz29-Dec-04 7:36 
GeneralRe: Asynchronous socket programming - threading design question Pin
Adam Goossens29-Dec-04 14:37
Adam Goossens29-Dec-04 14:37 
GeneralDoDragDrop problem Pin
Marc Clifton29-Dec-04 2:16
mvaMarc Clifton29-Dec-04 2:16 
GeneralRe: DoDragDrop problem Pin
Robert Rohde29-Dec-04 2:55
Robert Rohde29-Dec-04 2:55 
GeneralRe: DoDragDrop problem Pin
Marc Clifton29-Dec-04 3:26
mvaMarc Clifton29-Dec-04 3:26 
Generaltime between points Pin
gerstla29-Dec-04 2:14
gerstla29-Dec-04 2:14 
GeneralRe: time between points Pin
Adam Goossens29-Dec-04 2:50
Adam Goossens29-Dec-04 2:50 
GeneralWinforms Pin
| Muhammad Waqas Butt |29-Dec-04 1:35
professional| Muhammad Waqas Butt |29-Dec-04 1:35 
GeneralCrystal Report Pin
| Muhammad Waqas Butt |29-Dec-04 1:00
professional| Muhammad Waqas Butt |29-Dec-04 1:00 
GeneralRe: Crystal Report Pin
Michael P Butler29-Dec-04 1:39
Michael P Butler29-Dec-04 1:39 
GeneralNumber to Word Pin
| Muhammad Waqas Butt |29-Dec-04 0:57
professional| Muhammad Waqas Butt |29-Dec-04 0:57 
GeneralRe: Number to Word Pin
Marc Clifton29-Dec-04 3:11
mvaMarc Clifton29-Dec-04 3:11 
Generalchanging row color in a datagrid Pin
Salmanzz28-Dec-04 19:47
Salmanzz28-Dec-04 19:47 

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.