Re: TimeSetEvent



Jamie schreef:
Gert Baars wrote:

With TimeSetEvent a Callback function is assigned
to execute at an interval.
In the callback a COM-port is polled and data is
processed. A certain loop within the callback
sometimes hangs (or is not exectuted) while
another runs normally. All processing is done within
the intervaltime (20mS). Should certain global
variables be protected to avoid this?
you should have a BUSY flag in the call back code.

in the start of your code above the Var section
Const Busy :Boolean = false;

Begin
If Busy then Exit else Busy := true;
... do your code

Busy := false;
End;

P.s.
Make sure your compiler is set to have writeable constants.


Sounds nifty but I assume this is to prevent
reentrance before completion which is not the case.

.



Relevant Pages

  • Re: TimeSetEvent
    ... In the callback a COM-port is polled and data is ... sometimes hangs while ... the intervaltime. ... you should have a BUSY flag in the call back code. ...
    (alt.comp.lang.borland-delphi)
  • Re: More & more phone companies do not provide busy signal anymore!!!!
    ... the callback on busy service is available in Germany too ... > Does it mean you also do not have busy signal but recording asking you to ... on normal busy tone you can enter an ISDN feature code to get a callback ... Microsoft MVP for TAPI / Windows SDK ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Chung is off his meds and ranting on behalf of satan
    ... Maybe he's the type who hangs out on a street corner, ... raving about the end of the world. ... By keeping him busy here, ...
    (rec.food.cooking)
  • SuSE 9.1 incomplete online update.
    ... Online "total" update hung at 82%. ... Started update again and now it hangs at 3% (very likely ... a busy ftp.suse.com). ...
    (alt.os.linux.suse)
  • Re: Ticket office on form
    ... Alex wrote: ... minutes then the bint comes on to tell me the office is closed, and hangs up. ... Now all lines are busy. ...
    (uk.sport.football.clubs.liverpool)