Click here to Skip to main content
14,669,117 members
Home » Discussions » C#
   

C#

 
GeneralRe: Problem with XML Schema Pin
harold aptroot8-Jun-09 8:31
Memberharold aptroot8-Jun-09 8:31 
GeneralRe: Problem with XML Schema Pin
paradisonoir8-Jun-09 8:53
Memberparadisonoir8-Jun-09 8:53 
QuestionTCP Client/Server and Speech Recognition Pin
soflp-pt8-Jun-09 7:53
Membersoflp-pt8-Jun-09 7:53 
QuestionI am getting some unhandled exception after installing when i include crystal reports in the project with reports its working. Pin
praveenkumar_vittaboina8-Jun-09 7:18
Memberpraveenkumar_vittaboina8-Jun-09 7:18 
Questionthreading and timercallback Pin
Saamir8-Jun-09 7:02
MemberSaamir8-Jun-09 7:02 
AnswerRe: threading and timercallback Pin
Luc Pattyn8-Jun-09 7:23
sitebuilderLuc Pattyn8-Jun-09 7:23 
GeneralRe: threading and timercallback Pin
Saamir8-Jun-09 7:29
MemberSaamir8-Jun-09 7:29 
GeneralRe: threading and timercallback Pin
Luc Pattyn8-Jun-09 7:53
sitebuilderLuc Pattyn8-Jun-09 7:53 
OK, so if one run exceeds the allotted time period, you want the current run to terminate normally, and the new run of the function to follow immediately. This is some pseudo-code that would achieve this:

private int activationCounter=0;

void periodicFunction() {
    int n=Interlocked.Increment(ref activationCounter);     // increments in a safe way
    if (n<=1) {                // check no other execution is going on
        do {
            // whatever needs to be done periodically
            // (while this happens, the counter could get incremented)
            // when done, decrement and test the counter:
            n=Interlocked.Decrement(ref activationCounter); // decrements in a safe way
        } while (n!=0);                                     // check more is required
}


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

GeneralRe: threading and timercallback Pin
Saamir9-Jun-09 6:00
MemberSaamir9-Jun-09 6:00 
GeneralRe: threading and timercallback Pin
Luc Pattyn9-Jun-09 6:33
sitebuilderLuc Pattyn9-Jun-09 6:33 
AnswerRe: threading and timercallback Pin
yunusdemiray8-Jun-09 20:20
Memberyunusdemiray8-Jun-09 20:20 
GeneralRe: threading and timercallback Pin
Saamir9-Jun-09 6:01
MemberSaamir9-Jun-09 6:01 
GeneralRe: threading and timercallback Pin
Luc Pattyn9-Jun-09 6:32
sitebuilderLuc Pattyn9-Jun-09 6:32 
Questionis dataset performs well over Lists when navigating data in the memory Pin
prasadbuddhika8-Jun-09 5:30
Memberprasadbuddhika8-Jun-09 5:30 
AnswerRe: is dataset performs well over Lists when navigating data in the memory Pin
Henry Minute8-Jun-09 9:56
MemberHenry Minute8-Jun-09 9:56 
QuestionWeb Cam Problem Pin
S K Y8-Jun-09 5:23
MemberS K Y8-Jun-09 5:23 
AnswerRe: Web Cam Problem Pin
DaveyM698-Jun-09 5:31
professionalDaveyM698-Jun-09 5:31 
AnswerRe: Web Cam Problem Pin
Simon P Stevens8-Jun-09 5:38
MemberSimon P Stevens8-Jun-09 5:38 
QuestionHow to embed a internet explorer in a webbrowser control using c# Pin
Yukivi8-Jun-09 5:08
MemberYukivi8-Jun-09 5:08 
QuestionCast where XML file defines what integer and floating point values should be cast to. Pin
Dennis Lerche8-Jun-09 4:10
MemberDennis Lerche8-Jun-09 4:10 
AnswerRe: Cast where XML file defines what integer and floating point values should be cast to. Pin
led mike8-Jun-09 5:08
Memberled mike8-Jun-09 5:08 
GeneralRe: Cast where XML file defines what integer and floating point values should be cast to. Pin
Dennis Lerche8-Jun-09 9:52
MemberDennis Lerche8-Jun-09 9:52 
GeneralRe: Cast where XML file defines what integer and floating point values should be cast to. Pin
Dennis Lerche8-Jun-09 23:36
MemberDennis Lerche8-Jun-09 23:36 
QuestionHow to count a character in a string? Pin
SimpleData8-Jun-09 3:47
MemberSimpleData8-Jun-09 3:47 
AnswerRe: How to count a character in a string? Pin
PIEBALDconsult8-Jun-09 3:52
professionalPIEBALDconsult8-Jun-09 3:52 

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.