Skip to Content
훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
book

훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우

by 최원재, 강전희, 안재덕, 남윤화, 피트 구들리프
May 2016
Beginner to intermediate
438 pages
8h 46m
Korean
Hanbit Media, Inc.
Content preview from 훌륭한 프로그래머 되는 법: 프로젝트와 팀을 성공으로 이끄는 선배 개발자의 노하우
111
9
장
예상하지 못한 것을 예상하기
하고 톱니바퀴들이 계속 돌아가게 만드는지에 대해서도 알아보았다. 하지만 생명 주기의 반대
측면에 대해서는 신경 쓰지 않았다. 즉, 리소스의 누출이나 데드락, 충돌 없이 코드를 우아하게
중단시킬 수 있는지에 대해서는 아직 확인하지 않았다.
시스템을 종료하고 모든 객체를 파기하는 것은 다중 스레드 시스템에서는 특히 어려운 일이다.
애플리케이션이 종료되면서 작업자 객체
worker
object
를 파기하므로, 그 과정에서 이미 파기한 객
체를 사용하면 안 된다. 목표 객체가 이미 다른 스레드에 의해 제거된 콜백을 작업 큐에 넣으면
안 된다.
9.4
이 이야기의 교훈
‘예상하지 못한 것’ 은 결코 이상한 것이 아니며, 버그의 구성 요소라 할 수 있다. 코드를 작성할
때는 이를 고려해야 한다.
다만, 개발 초기에 고려해야 한다. 나중에는 해당 이슈를 적절히 처리하기 어렵다. 왜냐하면 이
런 문제는 개발자도 모르는 사이에 코드 깊숙한 곳에서 진행되기 때문이다. 이 괴물은 코드가
커진 뒤에는 더욱 제거하기 어렵다.
TIP
코드 작성 시 가능한 모든 코드 경로를 고려해야 한다. 나중에 비정상적인 경우에 대응하려 하지 말라. 그렇게 할
일을 미루다 보면, 이후 그와 같은 경로 자체가 있음을 잊어버리게 되고 코드는 버그로 가득 찰 것이다
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

클라우드 네이티브: 클라우드 네이티브 애플리케이션을 설계, 개발, 운영하는 핵심 가이드

정원천, 보리스 숄, 트렌트 스완슨, 피터 야우쇼베츠

Publisher Resources

ISBN: 9788968482304