일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 자바스크립트
- Keys
- router
- 그래프 탐색
- 게임 서버 아키텍처
- localstorage
- string
- HTTP
- Next
- html5
- trie
- ERD
- ccw 알고리즘
- JavaScript
- Prisma
- 백준 1918번
- 그리디
- branch
- PROJECT
- MySQL
- Github
- MongoDB
- 트라이
- DP
- vector insert
- Express.js
- 이분 탐색
- pm2
- insomnia
- map
Archives
- Today
- Total
목록lock-free 알고리즘 (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