Return-Path: X-Original-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-celix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B5B0310EDA for ; Tue, 28 Jan 2014 18:49:32 +0000 (UTC) Received: (qmail 65133 invoked by uid 500); 28 Jan 2014 18:49:32 -0000 Delivered-To: apmail-incubator-celix-dev-archive@incubator.apache.org Received: (qmail 65080 invoked by uid 500); 28 Jan 2014 18:49:31 -0000 Mailing-List: contact celix-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: celix-dev@incubator.apache.org Delivered-To: mailing list celix-dev@incubator.apache.org Received: (qmail 65072 invoked by uid 99); 28 Jan 2014 18:49:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 18:49:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pepijnnoltes@gmail.com designates 209.85.214.54 as permitted sender) Received: from [209.85.214.54] (HELO mail-bk0-f54.google.com) (209.85.214.54) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 18:49:24 +0000 Received: by mail-bk0-f54.google.com with SMTP id u14so562277bkz.27 for ; Tue, 28 Jan 2014 10:49:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=DV6mm+g4FEitv1lhsLh4xc+3iPwGq4hNMwSQSHdvzhU=; b=QnQ348JVAGsxixkrGy0agnsxA3hvPAEujttcq666Zk8nxkj8nEQw6Td1+QxYZyJkt2 lME3E167t7OGFWn9fX0TPz9IaDJmgcGydrb7O7K56eLWtmlJaSVXN+D11P+fVTp8gUmh oQN0mjdgoBD+Z9EWgIQTW+2Xpfpx0Wv+7s0pT3NNWlSofXkiRvztefrTU2kERV8/nuwF 0QndOoIa02ES3yl6EBVjK0GrX1NGjxKn6eIopVRIXSRfE9OSW7QDNx8/th6QLcuS8+dk EXDSKv6tJ6Ev3oeL7QoJvuyKPeX1C2gSz4+65Ezx8RDTVF1ZEDYFALDowahfBVPvp9UG utAA== MIME-Version: 1.0 X-Received: by 10.204.73.2 with SMTP id o2mr3295135bkj.55.1390934944301; Tue, 28 Jan 2014 10:49:04 -0800 (PST) Received: by 10.204.180.3 with HTTP; Tue, 28 Jan 2014 10:49:04 -0800 (PST) In-Reply-To: References: Date: Tue, 28 Jan 2014 19:49:04 +0100 Message-ID: Subject: Re: Event admin patch From: Pepijn Noltes To: celix-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=047d7b874e4c43031504f10c4793 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b874e4c43031504f10c4793 Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, On Sun, Jan 26, 2014 at 7:55 PM, 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 deleted. 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 ideas? > > Regards, > > Erik > > --047d7b874e4c43031504f10c4793--