This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import java.util.concurrent.ArrayBlockingQueue; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.locks.LockSupport; | |
class Task { | |
int id; | |
String data; | |
Thread thread; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.FileOutputStream; | |
import java.io.IOException; | |
public class Hello { | |
public static void main(String[] args) throws IOException { | |
long a = System.currentTimeMillis(); | |
int size = (int) (Math.pow(10, 8) * 4); //bytes | |
byte[] bytes = new byte[size]; | |
for (int i = 0; i < bytes.length; i++) { | |
bytes[i] = (byte) i; |