Hi Olivier, thanks for detailed answer and the updates.
Currently, I handle this missing feature in my program with a "deamon" async thread, which is started on place 0 in the relevant finish. The daemon only terminates, if all (or no) handler were triggered. In worst case, no handler is triggered in time, the deamon terminates, and the handler will not work as expected. I think this case is very unlikley. However, a handler inside a finish would be very nice. cheers, Jonas Am 10.10.2016 um 22:44 schrieb Olivier Tardieu: > Hi Jonas, > > The place failure handling scheme is a work in progress. > > In principle I would like place failure handlers to be a kind of > optional task (that runs iff a failure is detected) > inside the enclosing finish. In other words, the finish should not > complete before the handler returns > but the finish may complete if the optional task is not triggered. > But I have had no time to implement these semantics and for now a > handler is not really a task, > in particular it has no logical parent task or enclosing finish. > > For now, I have pushed a fix that includes your proposed patch > (but also makes sure to set worker.task to null for actions others than > apgas tasks). > > Thanks for the report! > > BTW now you have signed the contributor agreement, you should submit > pull requests for such things. > > Olivier > > Jonas Posner <jonas.pos...@uni-kassel.de> wrote on 10/07/2016 08:11:52 AM: > >> From: Jonas Posner <jonas.pos...@uni-kassel.de> >> To: Mailing list for users of the X10 programming language <x10- >> us...@lists.sourceforge.net> >> Date: 10/07/2016 08:12 AM >> Subject: Re: [X10-users] [APGAS] Unexpected NullPointerException >> from an at in an placeFailureHandler >> >> Hi all, >> >> I debugged a little and added in GlobalRuntimeImp in finish(Job f) a >> check if worker.task is null: >> >> final Finish finish = factory.make(worker == null || worker.task == null >> ? NullFinish.SINGLETON : worker.task.finish); >> >> It works in my cases. Is this correct? >> >> Thanks and cheers, >> Jonas >> >> Am 07.10.2016 um 11:46 schrieb Jonas Posner: >> > Hi all, >> > >> > I am playing around with the placeFailureHandler in APGAS. I get an >> > totally unexpected NullPointerException when I use an at in the handler. >> > A minimal example, which throws it: >> > http://pastebin.com/Fsw996Z5 >> > >> > What is the reason for this? >> > >> > Thanks and cheers, >> > Jonas >> > >> > >> > PS: I will answer the other mail soon >> > >> >> -- >> Jonas Posner >> Universitaet Kassel >> Fachbereich 16 Elektrotechnik/Informatik >> Fachgebiet Programmiersprachen/-methodik >> Wilhelmshoeher Allee 71-73 >> 34121 Kassel, Germany >> >> Phone: +49 (0)561 804-6498 >> Fax: +49 (0)561 804-6219 >> mailto: jonas.pos...@uni-kassel.de >> www.uni-kassel.de >> >> > ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ >> X10-users mailing list >> X10-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/x10-users >> > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users > -- Jonas Posner Universitaet Kassel Fachbereich 16 Elektrotechnik/Informatik Fachgebiet Programmiersprachen/-methodik Wilhelmshoeher Allee 71-73 34121 Kassel, Germany Phone: +49 (0)561 804-6498 Fax: +49 (0)561 804-6219 mailto: jonas.pos...@uni-kassel.de www.uni-kassel.de ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users