Operations Queue

Nov 29, 2009 at 10:45 PM

I love the operations queue in WBFSSync.  I wish I understood some things better though:

1.  What determines the order in which it executes items in the queue.  It does not do them in the sequence they are added, it seems to jump around?

2.  Is there a way to stop all operations in the queue?  It seems the only way is to close the program.  I can stop an individual item by clicking on the progress bar (not intuitive), but then it immediately starts the next item in queue.

I would like to be able to stop/pause/clear the entire operations queue, without exiting the application.

What do you all think?

Coordinator
Nov 30, 2009 at 6:02 PM

The operation manager used by WBFSSync is multithreaded, i used 1 thread for PC-Folder-to-PC-Folder operations and 1 thread per WBFS Drive that will do only operations related to that drive. If the operation is WBFS-Drive-to-WBFS-Drive the destination drive thread will be used and the source one's thread will remain idle and locked until the operation ends. Also the number of PC-only operations active at the same time is limited to '6'.

The random aspect of the Queue is also because the threads continually checks for new operations, since in-progress operations are only removed from the queue when they ends the threads need to loop through the entire list to:

1. Find a Pc-only operation or a WBfs operation (depending the thread).

2. Check if the operation is already running, if don't, begin the operation.

 

The Queue is a little primitive and messy, i'm working on a more organized approach.