SomberNight
96c063028a
qt TaskThread: implement cancellation of tasks, for cleaner shutdown
...
fixes https://github.com/spesmilo/electrum/issues/7750
Each task we schedule on `TaskThread` can provide an optional `cancel` method.
When stopping `TaskThread`, we call this `cancel` method on all tasks in the queue.
If the currently running task does not implement `cancel`, `TaskThread.stop` will block
until that task finishes.
Note that there is a significant change in behaviour here:
`ElectrumWindow.run_coroutine_from_thread` and `ElectrumWindow.pay_lightning_invoice`
previously serialised the execution of their coroutines via wallet.thread.
This is no longer the case: they will now schedule coroutines immediately.
So for example, the GUI now allows trying to pay multiple LN invoices "concurrently".
2022-04-07 19:51:58 +02:00
..
2022-04-07 19:51:58 +02:00
2022-03-09 13:40:44 +01:00
2022-03-26 15:26:13 +01:00
2021-06-25 17:40:23 +02:00
2022-01-20 16:59:10 +01:00
2022-03-29 17:42:04 +02:00
2021-04-30 19:43:53 +02:00
2020-06-23 19:25:07 +02:00
2020-02-11 20:57:37 +01:00
2022-03-30 13:44:10 +02:00
2022-03-15 13:39:33 +01:00
2021-04-30 19:55:47 +02:00
2020-02-27 05:13:31 +01:00
2022-02-15 18:22:44 +01:00
2021-04-30 13:13:01 +00:00
2022-03-02 13:29:24 +00:00
2021-11-13 04:31:08 +01:00
2021-09-22 14:50:32 +02:00
2022-02-17 15:44:47 +01:00
2022-02-17 15:44:47 +01:00
2021-04-14 19:08:04 +02:00
2022-03-29 17:42:04 +02:00
2021-06-22 16:16:21 +02:00
2020-06-05 13:17:01 +02:00
2021-03-21 00:36:23 -04:00
2021-03-21 00:36:23 -04:00
2022-03-02 11:42:49 +00:00
2021-10-25 17:46:51 +02:00
2021-04-08 19:49:43 +02:00
2020-02-21 15:59:18 +01:00
2022-02-22 19:20:03 +01:00
2018-07-13 14:01:37 +02:00
2022-02-22 15:04:37 +01:00
2021-09-15 19:52:40 +02:00
2022-02-28 15:17:56 +01:00
2021-09-15 16:41:41 +02:00
2022-01-20 16:47:48 +01:00
2022-02-22 19:20:03 +01:00
2022-02-16 19:24:38 +01:00
2022-03-29 18:30:55 +02:00
2021-09-24 17:36:33 +02:00
2021-03-19 20:51:38 +01:00
2021-03-21 00:36:23 -04:00
2022-03-17 17:52:38 +01:00
2021-07-15 14:52:25 +00:00
2021-07-29 16:26:23 +02:00
2021-11-01 18:05:33 +01:00
2022-02-16 18:53:24 +01:00
2022-03-09 13:40:44 +01:00
2021-03-05 20:46:41 +01:00
2021-09-27 10:31:44 +02:00
2022-04-07 19:51:58 +02:00
2021-04-14 19:14:26 +02:00
2021-04-08 16:24:10 +02:00
2021-07-16 11:27:36 +02:00
2022-03-11 15:39:03 +01:00
2021-03-21 00:36:23 -04:00
2020-06-04 20:27:26 +02:00
2018-07-13 14:01:37 +02:00
2021-02-08 20:26:16 +02:00
2018-07-13 14:01:37 +02:00
2021-03-21 00:36:23 -04:00
2022-03-11 15:49:30 +01:00
2021-06-25 17:40:23 +02:00
2018-07-13 14:01:37 +02:00
2019-02-11 20:21:24 +01:00
2021-03-17 18:11:55 +01:00
2018-07-13 14:01:37 +02:00
2021-05-06 19:47:22 +09:00
2022-01-18 19:54:24 +01:00
2022-01-18 19:54:24 +01:00
2022-03-31 22:50:31 +02:00
2021-06-22 19:24:16 +02:00
2021-11-09 01:02:57 +01:00
2021-01-06 21:27:10 +01:00
2022-04-01 21:30:41 +02:00
2022-02-15 18:22:44 +01:00
2022-02-18 10:14:51 +01:00
2022-04-01 21:31:50 +02:00
2022-03-23 03:58:33 +01:00
2022-04-04 20:55:47 +02:00
2022-03-24 15:59:14 +01:00
2022-02-25 20:44:05 +01:00
2022-04-01 13:56:05 +02:00
2020-02-11 16:41:49 +01:00