Skip to content

Synchronize all property access to a single thread #157

@nicolaspayette

Description

@nicolaspayette

Timing issues between things happening from code and things happening from the GUI are delicate. #156 is a good example of that.

As discussed with @qiemem on Gitter (https://gitter.im/CRESS-Surrey/eXtraWidgets?at=5548ec8952bceea22c3813dd):

All these problems stem from the fact that the widget models (i.e., Reader/Writer) can be accessed from both the job thread and the awt event thread. I didn't think of that before, but what if every call to reader/writer was blocking and ran: on the job thread if running headless; on the event thread otherwise. Since the job thread is allowed to wait on the event thread and that the opposite would never happen, would wouldn't get locking. And we'd have the garantee that everything always happens in the right order.
That's not a trivial change, however...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions