Thunar queued job execution

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Thunar queued job execution

Stefan Mitić
Hi everyone,

I am trying to implement the following functionality into Thunar:
 https://bugzilla.xfce.org/show_bug.cgi?id=12123

The way I understand it the only way to do this would be to create a new class "Thunar job manager" that will take over the management of Thunar jobs and their execution, that way we would be able to have control over the order of execution of jobs.

My question is what do you think about this approach and do you have any other ideas to implement this behavior?

Best regards,
Stefan Mitic

_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: Thunar queued job execution

Alex

Hi Stefan,

your solution-approach sounds ok, however I would solve the issue in a
different way:
I would add a "pause" and a "queue" button into the file-transfer-window
which pops up when tranfering/copying files, where "queue" = pause +
auto-wakeup when there is no other file-transfere running.

I quess there should be a way to pause thunar-jobs ? .. e.g. minimize
it's prio, so that it is not scheduled.

That should minimize thread-switching ... so the user would have the
full freedom to only queue single file-transfere operations on need.

Cheers,
Alex


On 26.10.2015 14:03, Stefan Mitić wrote:

> Hi everyone,
>
> I am trying to implement the following functionality into Thunar:
>  https://bugzilla.xfce.org/show_bug.cgi?id=12123
>
> The way I understand it the only way to do this would be to create a new
> class "Thunar job manager" that will take over the management of Thunar
> jobs and their execution, that way we would be able to have control over
> the order of execution of jobs.
>
> My question is what do you think about this approach and do you have any
> other ideas to implement this behavior?
>
> Best regards,
> Stefan Mitic
>
>
> _______________________________________________
> Xfce4-dev mailing list
> [hidden email]
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
>

_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: Thunar queued job execution

Stefan Mitić
Hi Alex,

first of all thanks for the answer. I have looked into thread management already and there is currently no way to set thread priority in GLib, that functionality was remover a long time ago (commit it was removed in) due to its unreliability. There is one way it could work right now but it would require (as far as I can tell) modifying "xfce/exo" which I would like to avoid as it is not used by just Thunar and might invoke problems with other peaces of Xfce using it.

I will try and write a "job manager" over the next few days and commit it for review and approval.

If you, or anyone else, have any ides on how to solve this differently I would appreciate any input.

Regards,
Stefan Mitic

On Mon, Oct 26, 2015 at 8:15 PM Alex <[hidden email]> wrote:

Hi Stefan,

your solution-approach sounds ok, however I would solve the issue in a
different way:
I would add a "pause" and a "queue" button into the file-transfer-window
which pops up when tranfering/copying files, where "queue" = pause +
auto-wakeup when there is no other file-transfere running.

I quess there should be a way to pause thunar-jobs ? .. e.g. minimize
it's prio, so that it is not scheduled.

That should minimize thread-switching ... so the user would have the
full freedom to only queue single file-transfere operations on need.

Cheers,
Alex


On 26.10.2015 14:03, Stefan Mitić wrote:
> Hi everyone,
>
> I am trying to implement the following functionality into Thunar:
https://bugzilla.xfce.org/show_bug.cgi?id=12123
>
> The way I understand it the only way to do this would be to create a new
> class "Thunar job manager" that will take over the management of Thunar
> jobs and their execution, that way we would be able to have control over
> the order of execution of jobs.
>
> My question is what do you think about this approach and do you have any
> other ideas to implement this behavior?
>
> Best regards,
> Stefan Mitic
>
>
> _______________________________________________
> Xfce4-dev mailing list
> [hidden email]
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
>

_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev

_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: Re: Thunar queued job execution

flo.xfce
In reply to this post by Stefan Mitić
Before you start rewriting Thunar or Exo jobs please be aware that these use deprecated API. Glib introducted GTask quite a while ago, and GTask has support for different priorities. Actually a lot of exo functionality is directly available in glib now (but not all of it).
To be honest I am not convinced that any of the Xfce projects should implement different copy modes. This is OS or at least low-level library stuff. We just build a job, how this job is actually processed is not really our concern. Just my 2 cents.

Kind regards

-----Original Message-----
Sent: Tuesday, 27 October 2015 ar 10:18:56
From: "Stefan Mitić" <[hidden email]>
To: "Xfce development list" <[hidden email]>
Subject: Re: Thunar queued job execution
Hi Alex,

first of all thanks for the answer. I have looked into thread management
already and there is currently no way to set thread priority in GLib, that
functionality was remover a long time ago (commit it was removed in
<https://git.gnome.org/browse/glib/commit/?id=51d92adeee67d1df30d13fe41e97af9e563f62ec>)
due to its unreliability. There is one way it could work right now but it
would require (as far as I can tell) modifying "xfce/exo" which I would
like to avoid as it is not used by just Thunar and might invoke problems
with other peaces of Xfce using it.

I will try and write a "job manager" over the next few days and commit it
for review and approval.

If you, or anyone else, have any ides on how to solve this differently I
would appreciate any input.

Regards,
Stefan Mitic

On Mon, Oct 26, 2015 at 8:15 PM Alex <[hidden email]> wrote:

>
> Hi Stefan,
>
> your solution-approach sounds ok, however I would solve the issue in a
> different way:
> I would add a "pause" and a "queue" button into the file-transfer-window
> which pops up when tranfering/copying files, where "queue" = pause +
> auto-wakeup when there is no other file-transfere running.
>
> I quess there should be a way to pause thunar-jobs ? .. e.g. minimize
> it's prio, so that it is not scheduled.
>
> That should minimize thread-switching ... so the user would have the
> full freedom to only queue single file-transfere operations on need.
>
> Cheers,
> Alex
>
>
> On 26.10.2015 14:03, Stefan Mitić wrote:
> > Hi everyone,
> >
> > I am trying to implement the following functionality into Thunar:
> >  https://bugzilla.xfce.org/show_bug.cgi?id=12123
> >
> > The way I understand it the only way to do this would be to create a new
> > class "Thunar job manager" that will take over the management of Thunar
> > jobs and their execution, that way we would be able to have control over
> > the order of execution of jobs.
> >
> > My question is what do you think about this approach and do you have any
> > other ideas to implement this behavior?
> >
> > Best regards,
> > Stefan Mitic
> >
> >
> > _______________________________________________
> > Xfce4-dev mailing list
> > [hidden email]
> > https://mail.xfce.org/mailman/listinfo/xfce4-dev
> >
>
> _______________________________________________
> Xfce4-dev mailing list
> [hidden email]
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: Thunar queued job execution

OmegaPhil-2
In reply to this post by Stefan Mitić
Just for reference, SpaceFM (an advanced C/glib file manager) has
task/job management (pausing, queuing, simultan
eous tasks etc) so you might want to see how it works:

https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#tasks

Main page: https://ignorantguru.github.io/spacefm/


On 27/10/15 09:18, Stefan Mitić wrote:
> Hi Alex,
>
> first of all thanks for the answer. I have looked into thread management
> already and there is currently no way to set thread priority in GLib, that
> functionality was remover a long time
ago (commit it was removed in

> <https://git.gnome.org/browse/glib/commit/?id=51d92adeee67d1df30d13fe41e97af9e563f62ec>)
> due to its unreliability. There is one way it could work right now but it
> would require (as far as I can tell) modifying "xfce/exo" which I would
> like to avoid as it is not used by just Thunar and might invoke problems
> with other peaces of Xfce using it.
>
> I will try and write a "job manager" over the next few days and commit it
> for review and approval.
>
> If you, or anyone else, have any ides on how to solve this differently I
> would appreciate any input.
>
> Regards,
> Stefan Mitic
>
> On Mon, Oct 26, 2015 at 8:15 PM Alex <[hidden email]> wrote:
>
>>
>> Hi Stefan,
>>
>> your solution-approach sounds ok, however I would solve the issue in a
>> different way:
>> I would add a "pause" and a "queue" button into the file-transfer-window
>> which pops up when tranfering/copying files, where "queue" = pause +
>> auto-wakeup when there is no other file-transfere running.
>>
>> I quess there should be a way to pause thunar-jobs ? .. e.g. minimize
>> it's prio, so that it is not scheduled.
>>
>> That should minimize thread-switching ... so the user would have the
>> full freedom to only queue single file-transfere operations on need.
>>
>> Cheers,
>> Alex
>>
>>
>> On 26.10.2015 14:03, Stefan Mitić wrote:
>>> Hi everyone,
>>>
>>> I am trying to implement the following functionality into Thunar:
>>>  https://bugzilla.xfce.org/show_bug.cgi?id=12123
>>>
>>> The way I understand it the only way to do this would be to create a new
>>> class "Thunar job manager" that will take over the management of Thunar
>>> jobs and their execution, that way we would be able to have control over
>>> the order of execution of jobs.
>>>
>>> My question is what do you think about this approach and do you have any
>>> other ideas to implement this behavior?
>>>
>>> Best regards,
>>> Stefan Mitic
>>>
>>>
>>> _______________________________________________
>>> Xfce4-dev mailing list
>>> [hidden email]
>>> https://mail.xfce.org/mailman/listinfo/xfce4-dev
>>>
>>
>> _______________________________________________
>> Xfce4-dev mailing list
>> [hidden email]
>> https://mail.xfce.org/mailman/listinfo/xfce4-dev
>
>
>
> _______________________________________________
> Xfce4-dev mailing list
> [hidden email]
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
>


_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: Thunar queued job execution

Stefan Mitić
In reply to this post by flo.xfce
Hi flo, OmegaPhil,

flo, thanks for the heads-up, I was aware of that and that's why I plan to avoid changing anything related to how Xfce handles tasks/jobs. My idea is to add something like a scheduler that will take care of when a Thunar job is run/created. After the creation of the job everything is left to the underlying systems. This should avoid problems with any other system also relying on Exo or any other underlying system.

OmegaPhil, I will certainly do that before I start working on the implementation. Thanks for this link/resource, I tried to find some file manager with that capability but wasn't able to.

Regards,
Stefan Mitic

On Tue, Oct 27, 2015 at 10:58 AM <[hidden email]> wrote:
Before you start rewriting Thunar or Exo jobs please be aware that these use deprecated API. Glib introducted GTask quite a while ago, and GTask has support for different priorities. Actually a lot of exo functionality is directly available in glib now (but not all of it).
To be honest I am not convinced that any of the Xfce projects should implement different copy modes. This is OS or at least low-level library stuff. We just build a job, how this job is actually processed is not really our concern. Just my 2 cents.

Kind regards

-----Original Message-----
Sent: Tuesday, 27 October 2015 ar 10:18:56
From: "Stefan Mitić" <[hidden email]>
To: "Xfce development list" <[hidden email]>
Subject: Re: Thunar queued job execution
Hi Alex,

first of all thanks for the answer. I have looked into thread management
already and there is currently no way to set thread priority in GLib, that
functionality was remover a long time ago (commit it was removed in
<https://git.gnome.org/browse/glib/commit/?id=51d92adeee67d1df30d13fe41e97af9e563f62ec>)
due to its unreliability. There is one way it could work right now but it
would require (as far as I can tell) modifying "xfce/exo" which I would
like to avoid as it is not used by just Thunar and might invoke problems
with other peaces of Xfce using it.

I will try and write a "job manager" over the next few days and commit it
for review and approval.

If you, or anyone else, have any ides on how to solve this differently I
would appreciate any input.

Regards,
Stefan Mitic

On Mon, Oct 26, 2015 at 8:15 PM Alex <[hidden email]> wrote:

>
> Hi Stefan,
>
> your solution-approach sounds ok, however I would solve the issue in a
> different way:
> I would add a "pause" and a "queue" button into the file-transfer-window
> which pops up when tranfering/copying files, where "queue" = pause +
> auto-wakeup when there is no other file-transfere running.
>
> I quess there should be a way to pause thunar-jobs ? .. e.g. minimize
> it's prio, so that it is not scheduled.
>
> That should minimize thread-switching ... so the user would have the
> full freedom to only queue single file-transfere operations on need.
>
> Cheers,
> Alex
>
>
> On 26.10.2015 14:03, Stefan Mitić wrote:
> > Hi everyone,
> >
> > I am trying to implement the following functionality into Thunar:
> >  https://bugzilla.xfce.org/show_bug.cgi?id=12123
> >
> > The way I understand it the only way to do this would be to create a new
> > class "Thunar job manager" that will take over the management of Thunar
> > jobs and their execution, that way we would be able to have control over
> > the order of execution of jobs.
> >
> > My question is what do you think about this approach and do you have any
> > other ideas to implement this behavior?
> >
> > Best regards,
> > Stefan Mitic
> >
> >
> > _______________________________________________
> > Xfce4-dev mailing list
> > [hidden email]
> > https://mail.xfce.org/mailman/listinfo/xfce4-dev
> >
>
> _______________________________________________
> Xfce4-dev mailing list
> [hidden email]
> https://mail.xfce.org/mailman/listinfo/xfce4-dev
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev

_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: Thunar queued job execution

flo.xfce
In reply to this post by Stefan Mitić
I wasn't saying that we should keep exo's (and therefore Thunar's) job/task management. A port to GTask is definitly worth it (but not planned for the 4.14 release and that's fine). Have a look at https://developer.gnome.org/gio/stable/GTask.html#g-task-run-in-thread. Especially the description.

-----Original message-----
Sent: Tuesday, 27 October 2015 at 11:20:31
From: "Stefan Mitić" <[hidden email]>
To: "Xfce development list" <[hidden email]>
Subject: Re: Re: Thunar queued job execution
Hi flo, OmegaPhil,

flo, thanks for the heads-up, I was aware of that and that's why I plan to
avoid changing anything related to how Xfce handles tasks/jobs. My idea is
to add something like a scheduler that will take care of when a Thunar job
is run/created. After the creation of the job everything is left to the
underlying systems. This should avoid problems with any other system also
relying on Exo or any other underlying system.

OmegaPhil, I will certainly do that before I start working on the
implementation. Thanks for this link/resource, I tried to find some file
manager with that capability but wasn't able to.

Regards,
Stefan Mitic

On Tue, Oct 27, 2015 at 10:58 AM <[hidden email]> wrote:

> Before you start rewriting Thunar or Exo jobs please be aware that these
> use deprecated API. Glib introducted GTask quite a while ago, and GTask has
> support for different priorities. Actually a lot of exo functionality is
> directly available in glib now (but not all of it).
> To be honest I am not convinced that any of the Xfce projects should
> implement different copy modes. This is OS or at least low-level library
> stuff. We just build a job, how this job is actually processed is not
> really our concern. Just my 2 cents.
>
> Kind regards
>
> -----Original Message-----
> Sent: Tuesday, 27 October 2015 ar 10:18:56
> From: "Stefan Mitić" <[hidden email]>
> To: "Xfce development list" <[hidden email]>
> Subject: Re: Thunar queued job execution
> Hi Alex,
>
> first of all thanks for the answer. I have looked into thread management
> already and there is currently no way to set thread priority in GLib, that
> functionality was remover a long time ago (commit it was removed in
> <
> https://git.gnome.org/browse/glib/commit/?id=51d92adeee67d1df30d13fe41e97af9e563f62ec
> >)
> due to its unreliability. There is one way it could work right now but it
> would require (as far as I can tell) modifying "xfce/exo" which I would
> like to avoid as it is not used by just Thunar and might invoke problems
> with other peaces of Xfce using it.
>
> I will try and write a "job manager" over the next few days and commit it
> for review and approval.
>
> If you, or anyone else, have any ides on how to solve this differently I
> would appreciate any input.
>
> Regards,
> Stefan Mitic
>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
Reply | Threaded
Open this post in threaded view
|

Re: Thunar queued job execution

Stefan Mitić
Yup, saw that.

If that is the case with the job/task manager, and as I am planing to try and get involved with the development of Xfce (if I may :D ), maybe I could take over rewriting of the whole job/task management system so that it uses the new GTask API.

If it can't be included in the 4.14 release maybe it can make it into some future release.

Now to be honest with you guys I came to this task as part of my job of which I can't say much more (for now) but includes some research for the improvement of open source project funding and development. But aside from that I have been trying to get into open source development for some time now as I am a daily user of Arch Linux (both professionally and personally) and Xfce as my main desktop environment. I would like to give back to the community and as a Software Engineer (currently final year of university) with a decent project background myself I think I should be well equipped for that.

Regards,
Stefan Mitic

On Tue, Oct 27, 2015 at 1:21 PM <[hidden email]> wrote:
I wasn't saying that we should keep exo's (and therefore Thunar's) job/task management. A port to GTask is definitly worth it (but not planned for the 4.14 release and that's fine). Have a look at https://developer.gnome.org/gio/stable/GTask.html#g-task-run-in-thread. Especially the description.

-----Original message-----
Sent: Tuesday, 27 October 2015 at 11:20:31
From: "Stefan Mitić" <[hidden email]>
To: "Xfce development list" <[hidden email]>
Subject: Re: Re: Thunar queued job execution
Hi flo, OmegaPhil,

flo, thanks for the heads-up, I was aware of that and that's why I plan to
avoid changing anything related to how Xfce handles tasks/jobs. My idea is
to add something like a scheduler that will take care of when a Thunar job
is run/created. After the creation of the job everything is left to the
underlying systems. This should avoid problems with any other system also
relying on Exo or any other underlying system.

OmegaPhil, I will certainly do that before I start working on the
implementation. Thanks for this link/resource, I tried to find some file
manager with that capability but wasn't able to.

Regards,
Stefan Mitic

On Tue, Oct 27, 2015 at 10:58 AM <[hidden email]> wrote:

> Before you start rewriting Thunar or Exo jobs please be aware that these
> use deprecated API. Glib introducted GTask quite a while ago, and GTask has
> support for different priorities. Actually a lot of exo functionality is
> directly available in glib now (but not all of it).
> To be honest I am not convinced that any of the Xfce projects should
> implement different copy modes. This is OS or at least low-level library
> stuff. We just build a job, how this job is actually processed is not
> really our concern. Just my 2 cents.
>
> Kind regards
>
> -----Original Message-----
> Sent: Tuesday, 27 October 2015 ar 10:18:56
> From: "Stefan Mitić" <[hidden email]>
> To: "Xfce development list" <[hidden email]>
> Subject: Re: Thunar queued job execution
> Hi Alex,
>
> first of all thanks for the answer. I have looked into thread management
> already and there is currently no way to set thread priority in GLib, that
> functionality was remover a long time ago (commit it was removed in
> <
> https://git.gnome.org/browse/glib/commit/?id=51d92adeee67d1df30d13fe41e97af9e563f62ec
> >)
> due to its unreliability. There is one way it could work right now but it
> would require (as far as I can tell) modifying "xfce/exo" which I would
> like to avoid as it is not used by just Thunar and might invoke problems
> with other peaces of Xfce using it.
>
> I will try and write a "job manager" over the next few days and commit it
> for review and approval.
>
> If you, or anyone else, have any ides on how to solve this differently I
> would appreciate any input.
>
> Regards,
> Stefan Mitic
>
_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev

_______________________________________________
Xfce4-dev mailing list
[hidden email]
https://mail.xfce.org/mailman/listinfo/xfce4-dev