Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] [resources] EFS, ECF and asynchronous

Scott Lewis wrote:
What do you have in mind WRT run-time checking?

To manage concurrency we use single threaded executors with one additional method: isInExecutorThread(). This is similar in concept the Realms, except it assumes that the realm is implemented using a thread. Certain APIs in DSF are required to be called in the thread of a given executor while other are thread safe, etc. To deal with the confusion that this creates we use annotations to declare how a certain interface or method can be called:

@ConfinedToDsfExecutor(executor), @ThreadSafe, @ThreadSafeAndProhibitedFromDsfExecutor(executor)

I would like to use these annotations at run time to enforce each method's thread access policy. This would help us catch some deadlocks long before they happen. Unfortunately I haven't had a time to take this past the idea stage, but I imagine that using something like AspectJ should make this quite feasible.
Cheers,
Pawel
Thanks,

Scott

_______________________________________________
eclipse-incubator-e4-dev mailing list
eclipse-incubator-e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipse-incubator-e4-dev



Back to the top