DESCRIPTION

Bug 491657 - Bindings have to be created within the validation realm

Change-Id: Id8c165391f54683c16a4a9953bcc497b3388b7e0
Signed-off-by: June Yoder xxx@xxx.xxx

COMMENTS

author: Brenden Conley
date: 2016-09-22 18:47:07.000000000

Patch Set 8:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/10554/

-------------------------------------
author: Brenden Conley
date: 2016-09-22 19:15:45.000000000

Patch Set 8: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/10554/ : SUCCESS

-------------------------------------
author: Zaid Mosley
date: 2016-09-23 12:39:56.000000000

Patch Set 8: Code-Review-1

See Bug comment, it is unclear to me what problem is getting fixed here.

-------------------------------------
author: Kelly Potter
date: 2016-09-23 20:18:18.000000000

Patch Set 8:

I'm in favor of being more explicit about the realm contracts on DataBindingContext. Documenting which realm each method can and can't be called from is really important. However, if we were to pick a contract, I'd say that a better contract would be that all methods on DataBindingContext can only be called from the validation realm, no exceptions. In that case, we wouldn't need (or want) the actual code change in Binding.java. It would be better to just document the fact that Binding#init(...) must be called from the validation realm.

-------------------------------------
author: Kelly Potter
date: 2016-09-23 20:19:09.000000000

Patch Set 8: Code-Review-1

-------------------------------------
author: June Yoder
date: 2016-10-01 14:43:35.000000000

Patch Set 8:

I personally don't like contracts like "You have to do that in order to access my methods". I really like contracts like "Just call me and I know how to handle your call correctly". I suggest, to make all calls realm-agnostic.

-------------------------------------
author: Kelly Potter
date: 2016-10-04 19:19:08.000000000

Patch Set 8:

> I suggest, to make all calls realm-agnostic.

A realm is a thread. When we say an object can only be used in a certain realm, we're saying it is a single-threaded method that can only be used by a specific thread. By asking for all apis to be "realm-agnostic", you're asking for all APIs to permit invocation from multiple threads without restriction.

This is a bad idea since it forces every method to do some sort of inefficient synchronization even though that synchronization is not used for single-threaded callers.

-------------------------------------
