Sync vs Async and Blocking vs Non-Blocking

ν—·κ°ˆλ¦¬λŠ” κ°œλ…μ„ μ •λ¦¬ν•΄λ³΄μ•„μš”!

image-20200827161039232

Block vs Non-Block

: μ œμ–΄ν•  수 μ—†λŠ” λŒ€μƒμ˜ 처리 방법

Block μ΄λž€?

  • μ œμ–΄κΆŒμ„ ν˜ΈμΆœν•œ ν•¨μˆ˜κ°€ 가지고 μžˆλ‹€κ°€, 결과값을 λ°˜ν™˜ν•  λ•Œ 같이 μ£ΌλŠ” 것

Sync vs Async

: 동기 vs 비동기 (좔상적)

Synchronous λž€?

  • Syn (ν•¨κ»˜) + Chrono (μ‹œκ°„)

    • λŒ€μƒλ“€μ˜ μ‹œκ°„μ΄ λ§žμΆ°μ§€λŠ”κ°€?

      • μ‹œκ°„μ„ μΌμΉ˜μ‹œν‚€λŠ” 것

    • μ œμ–΄κΆŒμ„ λ°˜ν™˜ν•˜λŠ” μ‹œκ°„κ³Ό 결과값을 μ „λ‹¬ν•˜λŠ” μ‹œκ°„μ΄ 같을 λ•Œ

      • 동기!

Asynchronous λž€?

  • μ‹œκ°„μ„ μΌμΉ˜μ‹œν‚€μ§€ μ•ŠλŠ” 것

Block & Non-Block vs Sync & Async

Block & Non-Block

  • μ œμ–΄κΆŒμ— κ΄€ν•œ 것

  • μ œμ–΄ν•  수 μ—†λŠ” λŒ€μƒμ„ μ–΄λ–»κ²Œ μ²˜λ¦¬ν•˜λŠ”κ°€?

Sync & Async

  • μ œμ–΄κΆŒμ„ λ°˜ν™˜ν•˜λŠ” μ‹œκ°„ (타이밍) 에 κ΄€ν•œ 것

  • λŒ€μƒλ“€μ˜ μ‹œκ°„μ„ μΌμΉ˜μ‹œν‚€λŠ”κ°€?

Last updated

Was this helpful?