Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Synchronization in ValidateAction's Diagnostician
Synchronization in ValidateAction's Diagnostician [message #1806127] Fri, 03 May 2019 08:07 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 340
Registered: December 2015
Senior Member

In ValidateAction, doValidate() of the Diagnostician is overridden, adding synchronization on the Resource/ResourceSet:

Re: Synchronization in ValidateAction's Diagnostician [message #1806133 is a reply to message #1806127] Fri, 03 May 2019 10:01 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6735
Registered: July 2009
Senior Member

Naively, EMF is not thread-safe so synchronization is irrelevant to EMF. It is the responsibility of EMF applications to ensure thread integrity of EMF in those applications.

Eclipse, comprising an EMF editor on the main/UI thread and a live validator on a worker thread is an EMF application that must ensure its thread integrity. A lock on the ResourceSet provides a simple way of suppressing the concurrency hazard. All applications that run within Eclipse should adopt this protocol that was introduced for the live validator. (Providing any finer degree of synchronization on vanilla EMF would be a nightmare. CDO provides serious synchronization. EMF Transaction provides some reader/writer synchronization.)


Ed Willink
Previous Topic:[CDO] Server. Adopting MySQL 8.x
Next Topic:EMF Element Binding to TreeViewer
Goto Forum:

Current Time: Thu Jun 04 21:18:20 GMT 2020

Powered by FUDForum. Page generated in 0.01909 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top