Re: Event-Queuing

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Schmidt (sss_at_online.de)
Date: 04/18/04


Date: Sun, 18 Apr 2004 13:50:06 +0200


"Lothar Geyer" <Lothar.Geyer@EDV-Berater-Online.de> schrieb im Newsbeitrag
news:c5tkf2$55npc$1@ID-200681.news.uni-berlin.de...

> ich hab' mich wieder mal falsch ausgedrückt :-((
> eigentlich ist das ein CallBack von einer DLL (auf die ich keinen
> Einfluß habe). Der CallBack liefert drei Parameter und wird in einer
> eigenen DLL abgearbeitet. Die Abhandlung (über Select Case) resultiert
> dann in Events, die vom Hauptprogramm abgearbeitet werden. Die CallBacks
> erfolgen aber so schnell, daß die Abhandlung eines CallBacks schon vom
> nächsten unterbrochen wird.
...achso...

> Ich hatte an eine FIFO-Liste gedacht. Es sind immer maximal drei
> CallBacks, die kurzfristig hintereinander kommen. Dann ist Pause bis zur
> nächsten Sequenz.

Dann versuch mal das hier:

Dim Queue as Collection

'Queueing
Dim Job as CJob
  If Queue Is Nothing Then Set Queue = New Collection
  Set Job = New CJob
  Job.xxx = xxxParam
  Job.yyy = yyyParam
  Queue.Add Job

'DeQueueing
Dim Job as CJob
  If Queue Is Nothing Then Set Queue = New Collection
  Do While Queue.Count
    Set Job = Queue(1)
    Queue.Remove 1
    'Process Job here
    '...
  Loop

Olaf



Relevant Pages

  • Re: Producer-consumer threading problem
    ... None if there wasn't anything to consume to prevent blocking. ... You could have callbacks that don't do ... iterator that yields results. ... Producer can push items on the queue and while the collector asynchronously pops them off. ...
    (comp.lang.python)
  • Re: A community Windows binding
    ... > GUI training vehicle, I don't think you can beat it (unless you ... simple windowing on Windows. ... Callbacks are a pain, but there aren't ... Between callbacks and the single queue of events for all windows of JEWL ...
    (comp.lang.ada)
  • Lotus 1-2-3 Version 1.6, drucken in Farbe?
    ... der Druckjob kommt und ist ebensoschnell wieder verschwunden ohne dass der Drucker jemals gezuck hat. ... Wenn ich die Queue anhalte, bleibt der Job erstmal stehen und kann auch betrachtet werden. ... Wenn ich den Druckertreiber hingegen aus Schwarz-Weiß stelle, kommt eine Seite raus. ...
    (comp.os.os2.apps)
  • Lotus 1-2-3 Version 1.6, drucken in Farbe?
    ... ich versuche seit einem Tag vergeblich eine farbige Seite aus Lotus ... verschwunden ohne dass der Drucker jemals gezuck hat. ... Wenn ich die Queue anhalte, bleibt der Job erstmal stehen und kann auch ...
    (de.comp.os.os2.apps)
  • Re: better scheduler with correct sleep times
    ... it calls the sleep method and while it sleeps (presumably ... programming: Event Queue. ... appropriate callbacks for each event. ... will execute the function you've given before. ...
    (comp.lang.python)