[libcamera-devel,v4,0/4] libcamera: object: Add deleteLater() support
mbox series

Message ID 20200731181410.99892-1-email@uajain.com
Headers show
Series
  • libcamera: object: Add deleteLater() support
Related show

Message

Umang Jain July 31, 2020, 6:14 p.m. UTC
Changes in v4:
  - Split out object-delete unit test from 2/3 in v3. The test is modified
    to also check for multiple deleteLater() calls.
  - Fix a bug in dispatchMessages() to erase list entries for empty
    messages (which was not happening in v3).
  - Indentation fixes. 

Changes in v3:
  - Address review for 1/3. dispatchMessages() message loop changed to support
    handling dispatching of all or per type messages.

Changes in v2:
  - Extend Thread::setEventDispatcher to selectively deliver messages
    - This will help if we want to explicitly deliver some messages if
      event loop is not running.
  - Include Object::deleteLater() unit test
    - One \todo here as one case pending to cover; multiple
      deleteLater() should only delete the object once.
  - Review comments (mostly documentation fixes).

Umang Jain (4):
  libcamera: thread: Support selective message dispatch to thread
  libcamera: object: Add deleteLater() support
  tests: Add a test case for the Object::deleteLater() API, to verify
  libcamera: camera: Ensure deletion via deleteLater()

 include/libcamera/camera.h           |  3 +-
 include/libcamera/internal/message.h |  1 +
 include/libcamera/internal/thread.h  |  3 +-
 include/libcamera/object.h           |  2 +
 src/libcamera/camera.cpp             |  2 +-
 src/libcamera/camera_manager.cpp     |  6 +-
 src/libcamera/message.cpp            |  2 +
 src/libcamera/object.cpp             | 48 ++++++++++++++
 src/libcamera/thread.cpp             | 35 +++++++---
 test/meson.build                     |  1 +
 test/object-delete.cpp               | 97 ++++++++++++++++++++++++++++
 11 files changed, 187 insertions(+), 13 deletions(-)
 create mode 100644 test/object-delete.cpp