File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 625
625
should not interact with the user. That's where View classes come in. The converse also
626
626
holds: try to not directly access core data structures from Views.
627
627
628
+ - Avoid adding slow or blocking code in the GUI thread. In particular do not
629
+ add new ` interface::Node ` and ` interface::Wallet ` method calls, even if they
630
+ may be fast now, in case they are changed to lock or communicate across
631
+ processes in the future.
632
+
633
+ Prefer to offload work from the GUI thread to worker threads (see
634
+ ` RPCExecutor ` in console code as an example) or take other steps (see
635
+ https://doc.qt.io/archives/qq/qq27-responsive-guis.html ) to keep the GUI
636
+ responsive.
637
+
638
+ - * Rationale* : Blocking the GUI thread can increase latency, and lead to
639
+ hangs and deadlocks.
640
+
628
641
Subtrees
629
642
----------
630
643
You can’t perform that action at this time.
0 commit comments