Right now most of the model is handed over to a different thread and
it should really not be touched by any other threads after that. This
model "works", but is collaborative in the sense that everyone has to
play by the rules; and these rules are not obvious to most people.

I'm thinking about something like what hibernate does; overrride every
single public method in a subclass and wrap the inner class with some
checks. I have quite a bit of experience with the checks, but none at
all with the kind of bytecode generation required to do this :=)

If such a diagnostic mode blows up *hard* on all kinds of improper
access, it would allow us to identify issues. Right now we're in this
"it works great here/it blows up here" mode, because it may be as
simple as a single feature in a single plugin that makes everything
blow up. So while it's certainly interesting to make core models
immutable and possibly thread safe(r), I think it's even cooler to get
a well defined idea of where current problems really are located.

Probably we could fix all the "real" issues quite easily with such a
mechanism available. And for each real problem we can make a real
judgement if the plugin is in violation of the contract or if maven
needs to be fixed.

I'm not really in a position to discuss ReadWriteLocks or other forms
of per-issue improvements until I understand the actual problems in
question fully, and in most cases that includes moving one or two
extra steps in addition to simply saying "they both called the same
setter". Why did they do that ?

Kristian



2015-01-05 21:40 GMT+01:00 Tibor Digana <tibordig...@apache.org>:
> Hard to understand what combination of multiple threads + bytecode
> manipulation is interesting for you.
> It looks like you want to make a Proxy over interfaces and throw an
> exception if some other Thread is trying to make harmful operation, or so.
>
> You know the core much better than me; Is it possible to create object model
> in main Thread in maven-core, and the execution of parallel modules done in
> new Threads, but access to the model would be controlled by a center point
> (service) and guardian lock ReentrantReadWriteLock?
> Sharing the collection objects wouldn't be possible anymore and thus no need
> for soecial collections.
> At most of the time, there should be read operations on the model in the
> center point - no blocker happens with reads however semi-ordering is
> awailable between writes and reads|writes.
>
>
>
> --
> View this message in context: 
> http://maven.40175.n5.nabble.com/Formal-verification-of-thread-correctness-in-maven-core-tp5822508p5822560.html
> Sent from the Maven Developers mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to