Simply because SWT is not thread safe.
Kind regards,
Andrey Loskutov
Спасение утопающих - дело рук самих утопающих
https://www.eclipse.org/user/aloskutov
Andrey Loskutov
Спасение утопающих - дело рук самих утопающих
https://www.eclipse.org/user/aloskutov
Gesendet: Montag, 27. Mai 2019 um 13:58 Uhr
Von: "Mickael Istria" <[email protected]>
An: "Eclipse platform general developers list." <[email protected]>
Betreff: [platform-dev] SWT naive question: why "checkWidget()" everywhere?
Von: "Mickael Istria" <[email protected]>
An: "Eclipse platform general developers list." <[email protected]>
Betreff: [platform-dev] SWT naive question: why "checkWidget()" everywhere?
Hi all,
I'm currently working on the topic of moving work out of UI Thread, using JDT as main target (bug 538656).
In my investigations, I've hit the case of calling `StyledText.getBlockSelection()` sending a InvalidThreadAccess because first line of the method is `checkWidget()`.
However, this method is mostly a boolean accessor, the state of block selection or not is purely inside the Java logic, no JNI. Invoking this method from a thread is definitely a harmless operation
So I'm wondering: why is SWT putting so much `checkWidget()` even on simple accessors? Is this something we could get rid of?
Thanks in advance for your insights.
--
_______________________________________________ platform-dev mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/platform-dev
