|
|
#1 |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,648
Karma: 5010733
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Plugin GUI Threading
Kovid, et al,
FanFicFare plugin does an imap fetch that can now take longer than it used to. I've been just running it in foreground, but I've had a PR proposed to use a thread to do run it instead: https://github.com/JimmXinu/FanFicFa...l/1430/changes That basically makes is a background thread, user can continue to work in the GUI. I've not investigated what happens with library change, library vs device view, etc. I know Calibre has been doing a lot more threaded processing; but what's your guidance on plugins threading? Would this be acceptable? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,530
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
All interactions with the GUI have to be in the main thread. The db.new_api is thread safe and can be used in a worker thread.
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,648
Karma: 5010733
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Okay, I think I understand. Thanks.
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [GUI Plugin] Streamer - RSVP Speed Reader plugin for Calibre | npapadacis | Plugins | 6 | 04-24-2026 03:00 AM |
| [GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 03:15 PM |
| [GUI Plugin] Save Virtual Libraries To Column (GUI) | chaley | Plugins | 14 | 04-04-2021 05:25 AM |
| [GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |