celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pepijn Noltes <pepijnnol...@gmail.com>
Subject Re: Event admin patch
Date Tue, 28 Jan 2014 18:49:04 GMT
Hi Erik,

On Sun, Jan 26, 2014 at 7:55 PM, <erik@jansman.eu> wrote:

> Hello,
> I'm sending an updated version of the event admin. I have renamed the
> methods to follow the standards. I have moved the event admin into the
> celix folder like the other subprojects.
> Known issues:
> 1: The async sending isn't implemented yet.
> 2: At this moment the event publisher is owner of the memory for the
> event. This is probably not the best solution for the async sending.
> I would like to propose a change to the Event admin and move the event
> implementation to the event admin. This would make the event admin owner
> of the memory.
> Would this be a good choice or is there another solution?

I think this is a good choice. The event admin knows when all sync/async
event handlers have been called and as result when the event can be
IMO the event admin API should contain a create for the event and clearly
states that is will also free this event when all event handlers have been
called. The event admin should free the event and its properties, but it
should clearly state that it cannot and will not free complex (e.g.
strings, or pointers to structs) values of the event properties.
For now that is IMO enough, but in eventually we probably also need a
callback to that the owner of the complex values of the event properties
can delete those.

There is of course always another solution ;) Anybody any better/different

> Regards,
> Erik

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message