Hi
I recently read an article how KDevelop handles threading and that got
me thinking. As far as I understand Pier currently uses a global lock
for all write operations (where #isView returns false). All good an
fine so far. But shouldn't this be a a read-write lock? Imagine the
following scenario:
- a view command is executed, is starts to read some objects, iterates
over some objects
- the current process is unscheduled
- a new process is with a write command is scheduled, it executes to completion
- the original view command is scheduled a again but it has
inconsistent information, eg the parent of an already read structure
has changed
A read-write lock should not affect performance because it allows
multiple concurrent readers.
Cheers
Philippe