JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Multithreaded file reading and writing

    JAVA 25 SELF
    59 level,0 lecture
    A practical guide to parallel file work in Java: when multithreading really speeds up I/O and when it doesn’t, choosing tools — Thread, thread pools via ExecutorService, async with CompletableFuture and parallel streams — plus reading large files in chunks via FileChannel, safe writes to a shared log, and OS/FS constraints. We break down task launch patterns, pool tuning, the shutdown()/ awaitTermination() methods, and common mistakes.
    Open
  • Parallel File Processing: ForkJoin, Parallel Streams

    JAVA 25 SELF
    59 level,1 lecture
    A practical guide to parallelizing file tasks in Java: how to enable parallelism in the Stream API using parallel()/ parallelStream(), how ForkJoinPool works and is configured, and when it’s better to use RecursiveTask. We’ll discuss where parallelism actually speeds up I/O, how to manage the common thread pool, and how to safely close resources ( try-with-resources). Finally—a quick look at positional access via FileChannel for reading/writing parts of large files.
    Open
  • Parallel FS traversals: Files.walk + parallel() and ForkJoin

    JAVA 25 SELF
    59 level,2 lecture
    How to speed up traversing large directories and processing thousands of files: use Files.walk() and parallel streams via parallel(), understand the role of ForkJoinPool.commonPool(), and tune the degree of parallelism. We explain when it’s better to switch to ExecutorService, how CPU-bound and IO-bound tasks differ, write an example that counts lines in all ".java" files, and capture best practices.
    Open
  • Splitting large files into chunks

    JAVA 25 SELF
    59 level,3 lecture
    How to speed up processing of gigabyte-scale files: split them into chunks (chunking), use positional access via FileChannel and memory-mapped buffers MappedByteBuffer, and parallelise computations with ExecutorService. We’ll cover key methods of positional I/O: position(...), read(...), write(...), criteria for choosing the chunk size, an example of parallel word counting, and typical mistakes (chunk boundaries, resources, number of threads).
    Open
  • File-processing pipelines: producer–consumer

    JAVA 25 SELF
    59 level,4 lecture
    We examine how to organize a file-processing pipeline using the Producer–Consumer pattern with safe exchange via a BlockingQueue (for example, ArrayBlockingQueue), how the blocking operations put() and take() work, why the backpressure mechanism is needed, and how to shut down threads correctly using a “poison pill” (for example, "__END__", not null). We launch consumers via ExecutorService, add a pipeline visualization, and go over common mistakes.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy