Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SystemProgramming

Lab 1 : Tasks synchronization and parallelization

Task: Google Drive

Variant: 9
Use Java, processes and process exit statud for result of function computation.

Done using ProcessBuilder and Thread. Cancellation via periodic user prompt.

Notices:

  1. You can't use KeyListener in console.
    Source: StackOverflow
  2. You can't listen for a key and prompt parameter as Scanner is blocking input.
    I was using separate thread with Scanner to listen for new line with 'q' symbol. Unfortunately, the only way to kill thread is to use flag to check if thread should be running or not. Scanner is blocking input, so sleeping is pointless, as it will be blocked by awaiting Scanner.

About

💻 Repo for lab tasks for System Programming

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages