Recent posts

delegate ํ‚ค์›Œ๋“œ

February 15 2021

delegate(๋Œ€๋ฆฌ์ž) ํ‚ค์›Œ๋“œ delegate๋Š” ๋ฉ”์„œ๋“œ๋ฅผ ๋‹ค๋ฅธ ๋ฉ”์„œ๋“œ์— ์ธ์ˆ˜๋กœ ์ „๋‹ฌํ•˜๋Š” ๋ฐ ์‚ฌ์šฉ ํ˜•์‹์ด ์ผ์น˜ํ•˜๋Š” ๊ตฌ์กฐ์˜ ๋ชจ๋“  ๋ฉ”์„œ๋“œ๋Š” ๋Œ€๋ฆฌ์ž์— ํ• ๋‹นํ•  ์ˆ˜ ์žˆ๋‹ค ๋ฉ”์„œ๋“œ๋Š” ์ •์ /์ธ์Šคํ„ด์Šค์ผ ์ˆ˜ ์žˆ๋‹ค. delegate ์†์„ฑ ํ•จ์ˆ˜ ํฌ์ธํ„ฐ์™€ ์œ ์‚ฌํ•˜์ง€๋งŒ, ๊ฐ์ฒด ์ง€ํ–ฅ์ ์œผ๋กœ ์ธ์Šคํ„ด์Šค ๋ฐ ๋ฉ”์„œ๋“œ๋ฅผ ์บก์Šํ™”ํ•œ๋‹ค. ๋ฉ”์„œ๋“œ๋ฅผ ๋งค๊ฐœ ๋ณ€์ˆ˜๋กœ ์ „๋‹ฌํ•  ์ˆ˜ ...

friend ํ‚ค์›Œ๋“œ

February 05 2021

friend class ํ•œ class์—์„œ ๋‹ค๋ฅธ class์˜ field๋ฅผ public์œผ๋กœ ์ฐธ์กฐํ•˜๋„๋ก ํ—ˆ์šฉ

Coroutine

January 19 2021

์„œ๋ธŒ๋ฃจํ‹ด(Subroutine) C์–ธ์–ด ๋“ฑ์—์„œ ์ผ๋ฐ˜์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ํ•จ์ˆ˜ ์‹œ์ž‘ํ•  ๋•Œ ์ง„์ž…ํ•˜๋Š” ์ง€์ ์ด ํ•˜๋‚˜ ์กด์žฌํ•˜๊ณ , ์ข…๋ฃŒ๋˜๋Š” ์ง€์ ์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค. ์„œ๋ธŒ๋ฃจํ‹ด์€ ์‹œ์ž‘์ ๊ณผ ์ข…๋ฃŒ์ ์ด 1๊ฐœ์ธ ์ฝ”๋ฃจํ‹ด์— ํฌํ•จ

Paralell Programming

November 15 2020

Synchronization ๋™๊ธฐํ™” ๋ณต์ˆ˜ ์ด๋ฒคํŠธ์˜ ์œ ์—ฐํ•œ ์‹คํ–‰ ๋ฐ ์กฐํ™”๋ฅผ ์œ„ํ•ด ์กฐ์ •์„ ๊ฐ€ํ•˜๋Š” ๊ฒƒ ๊ตฌ์† ์กฐ๊ฑด์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค Serialization: ํ•˜๋‚˜์˜ ์ด๋ฒคํŠธ๊ฐ€ ๋๋‚œ ๋‹ค์Œ์— ๋‹ค๋ฅธ ์ด๋ฒคํŠธ๊ฐ€ ๋ฐœ์ƒ Mutual Exclusion: ๋‘ ๊ฐœ์˜ ์ด๋ฒคํŠธ๊ฐ€ ํ•œ ์‹œ์ ์— ๋™์‹œ์— ๋ฐœ์ƒํ•˜๊ณ  ์žˆ์ง€ ์•Š์Œ

CAS Algorithm & ABA problem

November 12 2020

lock-base ์ฝ”๋“œ์˜ ๋ช‡๊ฐ€์ง€ ๋ฌธ์ œ์  lock ์ˆœ์„œ๋ฅผ ์ œ๋Œ€๋กœ ๊ด€๋ฆฌํ•˜์ง€ ์•Š์œผ๋ฉด ๋ฐ๋“œ๋ฝ์˜ ๊ฐ€๋Šฅ์„ฑ priority inversion - ๋‚ฎ์€ ์šฐ์„  ์ˆœ์œ„์˜ ์Šค๋ ˆ๋“œ๊ฐ€ ์ง„ํ–‰๋˜๊ธฐ ์œ„ํ•ด ๋†’์€ ์ˆœ์œ„์˜ ์Šค๋ ˆ๋“œ ๋ฝ์„ ์š”๊ตฌํ•˜๋Š” ๊ฒฝ์šฐ atomicํ•œ operation์ด ์˜ค๋ž˜ ๊ฑธ๋ฆฌ๋Š” ๊ฒฝ์šฐ, ๋‹ค๋ฅธ ์Šค๋ ˆ๋“œ๋“ค์€ ๊ธฐ๋‹ค๋ ค์•ผ ํ•จ