일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- branch
- trie
- 트라이
- ccw 알고리즘
- Next
- router
- 자바스크립트
- 그래프 탐색
- HTTP
- html5
- ERD
- 게임 서버 아키텍처
- PROJECT
- string
- 백준 1918번
- MongoDB
- JavaScript
- 그리디
- pm2
- map
- insomnia
- Express.js
- Prisma
- Keys
- Github
- 이분 탐색
- localstorage
- DP
- vector insert
- MySQL
Archives
- Today
- Total
목록멀티스레드 (1)
dh_0e

동기화가 고려되지 않은 멀티스레드 코드 예시 (JAVA)public class CounterTest { private static int counter = 0; public static void main(String[] args) throws InterruptedException { Thread[] threads = new Thread[10]; // 동기화 없이 실행 for (int i = 0; i { for (int j = 0; j 위 코드를 실행시키면 counter 값이 10000이 아니라 그에 못 미치는 99xx 값이 나온다.이는 데이터 경합 즉, Race condition이 발생한 결관데 동시에 counter 변수의 값을..
내일배움캠프/특강
2024. 7. 26. 21:04