Click here to Skip to main content
15,909,193 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to use event to re-write this code segment? Pin
Christian Graus1-Jun-08 16:39
protectorChristian Graus1-Jun-08 16:39 
GeneralRe: how to use event to re-write this code segment? Pin
George_George1-Jun-08 17:06
George_George1-Jun-08 17:06 
GeneralRe: how to use event to re-write this code segment? Pin
Christian Graus1-Jun-08 17:33
protectorChristian Graus1-Jun-08 17:33 
GeneralRe: how to use event to re-write this code segment? Pin
George_George1-Jun-08 17:44
George_George1-Jun-08 17:44 
GeneralRe: how to use event to re-write this code segment? Pin
Christian Graus1-Jun-08 17:57
protectorChristian Graus1-Jun-08 17:57 
GeneralRe: how to use event to re-write this code segment? Pin
George_George1-Jun-08 18:32
George_George1-Jun-08 18:32 
GeneralRe: how to use event to re-write this code segment? Pin
PIEBALDconsult2-Jun-08 6:22
mvePIEBALDconsult2-Jun-08 6:22 
GeneralRe: how to use event to re-write this code segment? Pin
N a v a n e e t h1-Jun-08 20:03
N a v a n e e t h1-Jun-08 20:03 
George_George wrote:
I think the Timer class is used to perform a task in a regular interval no matter whether or not the previous task is completed or not. So, it is possible to execute two tasks at the same time if the 1st task is not completed in 1 second for some reason. Right?


AFAIK, timer's execution will be blocked until it finishes the job. So you won't be able to run two tasks in parallel in normal case. I think you can use a Producer/Consumer Queue[^] like things to do this. Each time timer ticks, enqueue job. So it will be executed on another thread and timer thread won't be blocked. I might be wrong here

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: how to use event to re-write this code segment? Pin
George_George2-Jun-08 1:08
George_George2-Jun-08 1:08 
GeneralRe: how to use event to re-write this code segment? Pin
N a v a n e e t h2-Jun-08 1:23
N a v a n e e t h2-Jun-08 1:23 
GeneralRe: how to use event to re-write this code segment? Pin
George_George2-Jun-08 1:48
George_George2-Jun-08 1:48 
GeneralRe: how to use event to re-write this code segment? Pin
N a v a n e e t h2-Jun-08 3:03
N a v a n e e t h2-Jun-08 3:03 
GeneralRe: how to use event to re-write this code segment? Pin
George_George3-Jun-08 1:56
George_George3-Jun-08 1:56 
GeneralRe: how to use event to re-write this code segment? Pin
N a v a n e e t h3-Jun-08 7:10
N a v a n e e t h3-Jun-08 7:10 
GeneralRe: how to use event to re-write this code segment? Pin
George_George3-Jun-08 15:30
George_George3-Jun-08 15:30 
GeneralRe: how to use event to re-write this code segment? Pin
N a v a n e e t h3-Jun-08 15:42
N a v a n e e t h3-Jun-08 15:42 
GeneralRe: how to use event to re-write this code segment? Pin
George_George3-Jun-08 18:25
George_George3-Jun-08 18:25 
GeneralRe: how to use event to re-write this code segment? Pin
N a v a n e e t h4-Jun-08 3:51
N a v a n e e t h4-Jun-08 3:51 
GeneralRe: how to use event to re-write this code segment? Pin
George_George4-Jun-08 20:26
George_George4-Jun-08 20:26 
GeneralRe: how to use event to re-write this code segment? Pin
N a v a n e e t h5-Jun-08 6:47
N a v a n e e t h5-Jun-08 6:47 
GeneralRe: how to use event to re-write this code segment? Pin
George_George5-Jun-08 14:51
George_George5-Jun-08 14:51 
GeneralRe: how to use event to re-write this code segment? Pin
PIEBALDconsult1-Jun-08 17:49
mvePIEBALDconsult1-Jun-08 17:49 
GeneralRe: how to use event to re-write this code segment? Pin
George_George1-Jun-08 18:34
George_George1-Jun-08 18:34 
GeneralRe: how to use event to re-write this code segment? Pin
PIEBALDconsult1-Jun-08 19:12
mvePIEBALDconsult1-Jun-08 19:12 
GeneralRe: how to use event to re-write this code segment? Pin
George_George1-Jun-08 19:17
George_George1-Jun-08 19:17 

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.