[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Events blocking the event system?

On Mon, 18 Dec 2006 17:25:11 +0100 "Joerg Plewe"
<Joerg.Plewe@access-company.com> babbled:

> Hi all!
> For a very special use-case, I submit some custom event using
> ecore_event_add(). The event handler, under some conditions, will submit
> a new event of the same type again. This basically works as expected
> (kind of a tight loop), but all other events (esp. UI events like
> mousemove) are no longer processed.
> Is this the expected behavior?
> Can I force ecore to process the event queue?
> At least I can enforce repainting in the eventhandler with
> evas_render().

it is processing the event queue - because you keep putting events on the queue
- it just never gets back to reading fd handlers as its busy processing the
queue built FROM reading the fd handlers.

i.e. code goes:

1. call idle enterer calls (eg evas_render)
2. wait for data on fd handlers or some timeout
3. handle timeouts etc.
4. read all fd's (x etc.) and build events in queue
5. remove all unnecessary events.
6. process event queue
7. goto 1.

you basically get stuck looping in 6.

what i would suggest is that you use a timer that expires in 0.0 seconds from
now to put the events on the queue.

> I can help myself using a timer event instead with time 0, but for this
> seems to have some latency (on an embedded platform), I wanted to test
> out the event approach described above.

yes it will - but it means you actually process the rest of the pipeline. you
can also time yourself and once you have spent more than 0.01 second or
whatever feeding yourself events - abort and then put it in the timer. i.e. -
limit the amount of self-feeding to retain interactivity.

> Any help is appreciated,
> - J
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
Tokyo, Japan (東京 日本)