Home > Back-end >  Big file copying, NIO and multithreading which one is faster?
Big file copying, NIO and multithreading which one is faster?

Time:12-24

Rt
Excuse me each big, big file copying NIO
Is there any way a multithreaded + + files divided NIO way to copy the files?

CodePudding user response:

The
refer to the original poster FigSprite response:
rt
Excuse me each big, big file copying NIO
Is there any way a multithreaded + + files divided NIO way to copy the files?

Is ok, but you can't directly into inside a file, and each thread to write a file, do sorting, asynchronous listen, download a merger, the merged into one file

CodePudding user response:

The
reference 1/f, viewgroup response:
Quote: refer to the original poster FigSprite response:
rt
Excuse me each big, big file copying NIO
Is there any way a multithreaded + + files divided NIO way to copy the files?

Is ok, but you can't written directly to a file, and each thread to write a file, do sorting, asynchronous listen, download a merger, finally merged into one file


Such as 4 download good, then 3 or 5 have downloaded, and directly to merge, merged the record which files are ok

CodePudding user response:

Title to kill a person,,,,

How do you together to compare the multithreading and nio??????


Your problem is to copy a large file, the upstairs ideas is correct
  • Related