Background transfer with FS plugins

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Background transfer with FS plugins

Post by *ctiberg »

Hello!

I know that I posted about this, and that I've seen someone else too post about it. But I couldn't find the topics.

So here goes again. What would it take to get this working in my FS plugins? Is it supported by TC? Does it need to be? Will it ever be?

What I want is twofold: the ability to click "background" on a transfer that I've already started, and the ability to press F2 when copying from or too an FS plugin.
Best regards,
Christian Tiberg
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, it's currently not supported because many plugins (including some of my own) are not thread-safe and would crash when invoked multiple times.
Author of Total Commander
https://www.ghisler.com
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

OK, so the situation is still the same. Do you have any plans for a function like FsIsThreadSafe()? Or is that too much work to implement in TC?
Best regards,
Christian Tiberg
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Such a check would be easy to add, but the "move to background" would only work if the file transfer function would start in a background thread from the beginning (which is done already for the copy function). Such an addition wouldn't be so easy to add...
Author of Total Commander
https://www.ghisler.com
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

Just make it mandatory that all plubins that export the FsIsThreadSafe function to always start transfers that way, in a separate thread. Then it would be up to TC to handle the rest - the plugin is already doing everything in the background, but TC may display it in the foreground if it so chooses.

A little more work, yes, but oh so much more useful it would be for longer-running operations :)
Best regards,
Christian Tiberg
Postkutscher
Power Member
Power Member
Posts: 556
Joined: 2006-04-01, 00:11 UTC

Post by *Postkutscher »

ghisler(Author) wrote:Such a check would be easy to add, but the "move to background" would only work if the file transfer function would start in a background thread from the beginning (which is done already for the copy function). Such an addition wouldn't be so easy to add...
Would be nice.
Post Reply