Title: [Question] Item 16 - const 멤버함수를 스레드에 안전하게 작성하라 · Issue #4 · lunchclass/cpp · GitHub
Open Graph Title: [Question] Item 16 - const 멤버함수를 스레드에 안전하게 작성하라 · Issue #4 · lunchclass/cpp
X Title: [Question] Item 16 - const 멤버함수를 스레드에 안전하게 작성하라 · Issue #4 · lunchclass/cpp
Description: item16의 스터디 중 const 멤버 함수를 "항상" thread safety 하게 작성하라는 의도인가? 에 대한 토의가 있었습니다. 만약 저자가 C++11/14에서 const 멤버 함수도 항상 thread safety 하게 작성 해야 한다는 의도라면 기존의 설명 방식처럼, C++ 98 대비 C++11/14 부터는 달라지는 점이 있기 때문에 const 멤버 함수도 thread safety 하게 작성해야 한다 라는 논지...
Open Graph Description: item16의 스터디 중 const 멤버 함수를 "항상" thread safety 하게 작성하라는 의도인가? 에 대한 토의가 있었습니다. 만약 저자가 C++11/14에서 const 멤버 함수도 항상 thread safety 하게 작성 해야 한다는 의도라면 기존의 설명 방식처럼, C++ 98 대비 C++11/14 부터는 달라지는 점이 있기 때문에 con...
X Description: item16의 스터디 중 const 멤버 함수를 "항상" thread safety 하게 작성하라는 의도인가? 에 대한 토의가 있었습니다. 만약 저자가 C++11/14에서 const 멤버 함수도 항상 thread safety 하게 작성 해야 한다는 의도라면 기존의 설명 방식처럼, C++ 98 대비 C++11/14 부터는 달라지는 점이 ...
Opengraph URL: https://github.com/lunchclass/cpp/issues/4
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Question] Item 16 - const 멤버함수를 스레드에 안전하게 작성하라","articleBody":"item16의 스터디 중 const 멤버 함수를 \"항상\" thread safety 하게 작성하라는 의도인가? 에 대한 토의가 있었습니다.\r\n\r\n만약 저자가 C++11/14에서 const 멤버 함수도 항상 thread safety 하게 작성 해야 한다는 의도라면 기존의 설명 방식처럼, C++ 98 대비 C++11/14 부터는 달라지는 점이 있기 때문에 const 멤버 함수도 thread safety 하게 작성해야 한다 라는 논지로 설명을 했을거라는 의견이 있었습니다.(@JayChl)\r\n(그게 아니라면 C++11/14 에 대한 이야기 보다는 general 한 programming rule 이나 C++ 자체에 대한 설명으로 보는게 적합할 것으로 생각됨)\r\n\r\n반면에 다른 의견으로 getter 로 활용되는 const 멤버 함수의 경우 책의 예제처럼 caching 을 하려 한다면 멤버변수의 수정이 불가피 할 것이고, 이런 경우 피할 수 없는 것이 mutable 과 thread safety 이므로 이를 설명하기 위한것이다 라는 의견도 있었습니다.(@romandev)\r\n\r\n잠정적으로 아래의 Herb Sutter의 강의를 통해서 C++98 대비 C++11부터 \"const\" 에 대한 정의가 아래와\r\n 같이 변경되었고 변경된 C++11에서 const 멤버함수는 정의에 따라서 thread satety 하게 작성해야 한다로 판단하기로 하였습니다.\r\n[동영상 링크](https://channel9.msdn.com/posts/C-and-Beyond-2012-Herb-Sutter-You-dont-know-blank-and-blank)\r\n\r\nC++98 : const == logically const\r\nC++11 : const == thread safe (bitwise const or internally synchronized)\r\n\r\n* 글의 내용은 추후 변경 될 수 있음","author":{"url":"https://github.com/JayCheck","@type":"Person","name":"JayCheck"},"datePublished":"2017-09-04T14:52:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/4/cpp/issues/4"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:04fe6d93-e71f-4eb5-af0c-a57174d36f20 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C416:202362:F97163:141D606:697F8F5D |
| html-safe-nonce | 0f54d407615f3e3e6bfb3db5ec3018c3ff42d61368497c8f662e087897140fd4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDE2OjIwMjM2MjpGOTcxNjM6MTQxRDYwNjo2OTdGOEY1RCIsInZpc2l0b3JfaWQiOiI0Mjk1MzgzNzM3Nzk4OTg3NjEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 327ba93f559936384bc9b18339d02a1811c8c1d21419adf266a422c6299bffaf |
| hovercard-subject-tag | issue:255063984 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lunchclass/cpp/4/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e84c3bae100b3ecca0619fe80080017861fcb2eeb5e37b47731f5b4f30966e47/lunchclass/cpp/issues/4 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e84c3bae100b3ecca0619fe80080017861fcb2eeb5e37b47731f5b4f30966e47/lunchclass/cpp/issues/4 |
| og:image:alt | item16의 스터디 중 const 멤버 함수를 "항상" thread safety 하게 작성하라는 의도인가? 에 대한 토의가 있었습니다. 만약 저자가 C++11/14에서 const 멤버 함수도 항상 thread safety 하게 작성 해야 한다는 의도라면 기존의 설명 방식처럼, C++ 98 대비 C++11/14 부터는 달라지는 점이 있기 때문에 con... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JayCheck |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/lunchclass/cpp git https://github.com/lunchclass/cpp.git |
| octolytics-dimension-user_id | 29477287 |
| octolytics-dimension-user_login | lunchclass |
| octolytics-dimension-repository_id | 99764040 |
| octolytics-dimension-repository_nwo | lunchclass/cpp |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 99764040 |
| octolytics-dimension-repository_network_root_nwo | lunchclass/cpp |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width