Re: Threading question



Appreciate it Sergey,

My knowledge on threads is pretty limited. I guess I will try to figure out
how to have my
thread go through one item at a time in the listview and then do the
copying.

Thanks again.


John-


"Sergey Zyuzin" <forever.zet@xxxxxxxxx> wrote in message
news:d73f0882-8e5a-4b94-a73d-f94faf74a3b6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I think multithreaded implementation in this case won't benefit much,
because bottleneck in this case is hard drive but not CPU, unless you
are copying from/to many physical drives.
I suspect in some cases it can be even slower.

Nonetheless, to implement multithreaded copy I would create a Queue
where I put
all items to be copied. Then I would create 3-4 threads, which will
run the same routine.
This routine will take an item from the Queue in loop and perform
corresponding copy operation.


.



Relevant Pages

  • Re: [linux-pm] question on resume()
    ... Rafael is wrong; wake_updoesn't remove a task from a wait queue. ... Thus calling wake_upon a task in the refrigerator will accomplish ... The I/O's completion routine generally _will_ end up calling ...
    (Linux-Kernel)
  • Re: [linux-pm] question on resume()
    ... wake_updoesn't remove a task from a wait queue. ... queue after verifying that the necessary condition has been satisfied. ... Thus calling wake_upon a task in the refrigerator will accomplish ... The I/O's completion routine generally _will_ end up calling ...
    (Linux-Kernel)
  • Re: Threading question
    ... I want to add every dir to a listview, lets say I have some items in a ... do I need a different routine to copy the files for each thread? ... are copying from/to many physical drives. ... to implement multithreaded copy I would create a Queue ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Need Help with Programming
    ... the poster mentioned pasting, the poster also inferred "copying". ... are you simply talking about ONE database ... If the code routine to run the update is small, ...
    (microsoft.public.access.modulesdaovba)
  • Re: File monitor/copy code doesnt catch everything
    ... basically reads a registry key to get a path to a folder and it watches for ... files created in that folder. ... What you see as 'simultaneous' copying of several files, ... filename to a queue or list and then go back to watching for files. ...
    (microsoft.public.dotnet.languages.vb)

Loading