Commit graph

5 commits

Author SHA1 Message Date
Barnabás Pőcze
1e99551233 test: loop: do not use NULL as event handler 2022-03-06 18:40:43 +00:00
Barnabás Pőcze
d1f7e96f82 test: loop: add test for destroying source of thread loop
Add test which tries to destroy an active source precisely
after the loop has returned from polling but has not yet
acquired the thread loop lock.
2022-02-18 20:31:49 +01:00
Wim Taymans
231cc88cad test: don't leak the two objects 2022-02-08 19:04:08 +01:00
Barnabás Pőcze
bf886ba209 support: also protect against recursive invocations
Add an extra private field to the source to store the pollevent of
the current iteration. This changes ABI but it seems an embedded source
is not used outside of our own plugins and the unit test doesn't test
this ABI case.

Whenever a source is removed, we can set the data field of the
pollevent to NULL so that it won't be handled in any iteration anymore.

Avoid dispatching the same event multiple times when doing recursive
iterations.

Add some more unit tests for this.

Fixes #2114
2022-02-08 17:21:10 +01:00
Wim Taymans
5ac5ebfe19 test: add test for the loop 2022-02-08 11:08:16 +01:00