Multithreading in GUI

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Vladimyr0
Junior Member
Junior Member
Posts: 29
Joined: 2008-03-31, 07:35 UTC

Multithreading in GUI

Post by *Vladimyr0 »

Hello Christian, it would be nice to use multithreading in TC more active.
The goal: main GUI should never freeze, when slow drives (or plugins) are not responding.
Some controls can be grayed out or progress bars are displayed instead.
This will make TC more user-friendly and speed up user's work.

P.S.: had some experience in such programming on Delphi...
My program opened and closed trays on optical drives, but
each drive had its own dynamically created thread, plus one more
thread for GUI. Worked like a charm, even while discs were loading.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem is that many plugins are not thread-safe, therefore it's not possible to do this everywhere.
Author of Total Commander
https://www.ghisler.com
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2ghisler(Author)
Shot in the dark: if some plugins aren't thread-safe wouldn't it be possible to get some details from them using separate (hidden) TC process?

Standard TC instance could run another one with some parameters and communicate using WM messages.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
Vladimyr0
Junior Member
Junior Member
Posts: 29
Joined: 2008-03-31, 07:35 UTC

Post by *Vladimyr0 »

Let's stay plugins untouched for beginning...
But the main window sometimes is freezing entirely,
when a drive is working slow. Sometimes a small pop-up
is displaying the 'connect' message, but even in this
case user is not able to perform another action.

It's possible to make a progress bar for such situations,
to indicate that the drive is still accessing now. But other
panes and tabs should be active, to give the user ability
to work with other discs and folders (and as an ideal - with
files on the slow disc, which are appeared already on the
disc tab).

Let's consider GUI as the buffer, which is sending commands
to disc operating threads, and collecting response messages
from those ones. GUI can do anything: display some progress
bars, statuses, messages, but should never be inaccessible.
And allow the user to click, drag and edit any object at any time.
Post Reply