René's URL Explorer Experiment


Title: bestJavaer/java-concurrent/java-synchronized.md at master · wandeful/bestJavaer · GitHub

Open Graph Title: bestJavaer/java-concurrent/java-synchronized.md at master · wandeful/bestJavaer

X Title: bestJavaer/java-concurrent/java-synchronized.md at master · wandeful/bestJavaer

Description: 这是一个成为更好的Java程序员的系列教程. Contribute to wandeful/bestJavaer development by creating an account on GitHub.

Open Graph Description: 这是一个成为更好的Java程序员的系列教程. Contribute to wandeful/bestJavaer development by creating an account on GitHub.

X Description: 这是一个成为更好的Java程序员的系列教程. Contribute to wandeful/bestJavaer development by creating an account on GitHub.

Opengraph URL: https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/blob/*name(/*path)
route-controllerblob
route-actionshow
fetch-noncev2:7a0d6f38-2cd6-cc5b-c6ca-596ee8ee14b3
current-catalog-service-hashf3abb0cc802f3d7b95fc8762b94bdcb13bf39634c40c357301c4aa1d67a256fb
request-idE5FA:1A182C:24F8CDA:30BED8C:6A5CBB9C
html-safe-nonce1536f9a20235e85578211b875741f9452c94dfbbb557a62e4f64edd8d46a532e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUZBOjFBMTgyQzoyNEY4Q0RBOjMwQkVEOEM6NkE1Q0JCOUMiLCJ2aXNpdG9yX2lkIjoiMTY2Njc5MjY1Mzc3Mjg2NDQxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1356561161f49d175629a1c6c3ea2774af9c522e271ff89c506a257c083763ea
hovercard-subject-tagrepository:880322126
github-keyboard-shortcutsrepository,source-code,file-tree,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///blob/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md
twitter:imagehttps://opengraph.githubassets.com/9ecea6dcbfc38702973906a99b6c45c993593f43fafe9aba292b33758198ba29/wandeful/bestJavaer
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9ecea6dcbfc38702973906a99b6c45c993593f43fafe9aba292b33758198ba29/wandeful/bestJavaer
og:image:alt这是一个成为更好的Java程序员的系列教程. Contribute to wandeful/bestJavaer development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-cache
go-importgithub.com/wandeful/bestJavaer git https://github.com/wandeful/bestJavaer.git
octolytics-dimension-user_id28602079
octolytics-dimension-user_loginwandeful
octolytics-dimension-repository_id880322126
octolytics-dimension-repository_nwowandeful/bestJavaer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id269198820
octolytics-dimension-repository_parent_nwocrisxuan/bestJavaer
octolytics-dimension-repository_network_root_id269198820
octolytics-dimension-repository_network_root_nwocrisxuan/bestJavaer
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwandeful%2FbestJavaer%2Fblob%2Fmaster%2Fjava-concurrent%2Fjava-synchronized.md
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fwandeful%2FbestJavaer%2Fblob%2Fmaster%2Fjava-concurrent%2Fjava-synchronized.md
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow&source=header-repo&source_repo=wandeful%2FbestJavaer
Reloadhttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md
Reloadhttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md
Reloadhttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md
wandeful https://github.com/wandeful
bestJavaerhttps://github.com/wandeful/bestJavaer
crisxuan/bestJavaerhttps://github.com/crisxuan/bestJavaer
Notifications https://github.com/login?return_to=%2Fwandeful%2FbestJavaer
Fork 0 https://github.com/login?return_to=%2Fwandeful%2FbestJavaer
Star 0 https://github.com/login?return_to=%2Fwandeful%2FbestJavaer
Code https://github.com/wandeful/bestJavaer
Pull requests 0 https://github.com/wandeful/bestJavaer/pulls
Actions https://github.com/wandeful/bestJavaer/actions
Projects https://github.com/wandeful/bestJavaer/projects
Security and quality 0 https://github.com/wandeful/bestJavaer/security
Insights https://github.com/wandeful/bestJavaer/pulse
Code https://github.com/wandeful/bestJavaer
Pull requests https://github.com/wandeful/bestJavaer/pulls
Actions https://github.com/wandeful/bestJavaer/actions
Projects https://github.com/wandeful/bestJavaer/projects
Security and quality https://github.com/wandeful/bestJavaer/security
Insights https://github.com/wandeful/bestJavaer/pulse
https://github.com/wandeful/bestJavaer
bestJavaerhttps://github.com/wandeful/bestJavaer/tree/master
java-concurrenthttps://github.com/wandeful/bestJavaer/tree/master/java-concurrent
Historyhttps://github.com/wandeful/bestJavaer/commits/master/java-concurrent/java-synchronized.md
https://github.com/wandeful/bestJavaer/commits/master/java-concurrent/java-synchronized.md
bestJavaerhttps://github.com/wandeful/bestJavaer/tree/master
java-concurrenthttps://github.com/wandeful/bestJavaer/tree/master/java-concurrent
Rawhttps://github.com/wandeful/bestJavaer/raw/refs/heads/master/java-concurrent/java-synchronized.md
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#深入理解-synchronized-关键字
深入理解 synchronized 关键字https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3-synchronized-%E5%85%B3%E9%94%AE%E5%AD%97
前言https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E5%89%8D%E8%A8%80
浅析 synchronizedhttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E6%B5%85%E6%9E%90-synchronized
synchronized 的使用https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-%E7%9A%84%E4%BD%BF%E7%94%A8
synchronized 修饰实例方法https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-%E4%BF%AE%E9%A5%B0%E5%AE%9E%E4%BE%8B%E6%96%B9%E6%B3%95
synchronized 修饰静态方法https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-%E4%BF%AE%E9%A5%B0%E9%9D%99%E6%80%81%E6%96%B9%E6%B3%95
synchronized 修饰代码块https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-%E4%BF%AE%E9%A5%B0%E4%BB%A3%E7%A0%81%E5%9D%97
synchronized 底层原理https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-%E5%BA%95%E5%B1%82%E5%8E%9F%E7%90%86
Monitor 对象https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#monitor-%E5%AF%B9%E8%B1%A1
对象内存布局https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E5%AF%B9%E8%B1%A1%E5%86%85%E5%AD%98%E5%B8%83%E5%B1%80
对象头 Headerhttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E5%AF%B9%E8%B1%A1%E5%A4%B4-header
实例数据 Instance Datahttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E5%AE%9E%E4%BE%8B%E6%95%B0%E6%8D%AE-instance-data
对齐 Paddinghttps://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E5%AF%B9%E9%BD%90-padding
锁的升级流程https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E9%94%81%E7%9A%84%E5%8D%87%E7%BA%A7%E6%B5%81%E7%A8%8B
无锁https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E6%97%A0%E9%94%81
偏向锁https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E5%81%8F%E5%90%91%E9%94%81
轻量级锁https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E8%BD%BB%E9%87%8F%E7%BA%A7%E9%94%81
重量级锁https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#%E9%87%8D%E9%87%8F%E7%BA%A7%E9%94%81
synchronized 代码块的底层实现https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-%E4%BB%A3%E7%A0%81%E5%9D%97%E7%9A%84%E5%BA%95%E5%B1%82%E5%AE%9E%E7%8E%B0
synchronized 修饰方法的底层原理https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-%E4%BF%AE%E9%A5%B0%E6%96%B9%E6%B3%95%E7%9A%84%E5%BA%95%E5%B1%82%E5%8E%9F%E7%90%86
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#前言
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#浅析-synchronized
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-的使用
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-修饰实例方法
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-修饰静态方法
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-修饰代码块
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-底层原理
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#monitor-对象
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#对象内存布局
https://github.com/wandeful/bestJavaer/blob/master/Users/mr.l/Library/Application Support/typora-user-images/image-20201202064002278.png
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#对象头-header
https://camo.githubusercontent.com/8c91aab06e09abf7c696fbe93bc639b70509ebba338c422c9781c0093fff10f1/68747470733a2f2f696d61676573323031352e636e626c6f67732e636f6d2f626c6f672f3733313731362f3230313730332f3733313731362d32303137303330323130343030333536332d323039343336313036352e706e67
https://camo.githubusercontent.com/cd85ca2f213e83b7d96d6933ed81cd9c881043933ce00ba62c1c0248e46130bd/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039353632353935322d313034313038393531382e706e67
https://camo.githubusercontent.com/90fe5be1f2757248f513f47d2fb1e7aba3feb81dfb3540942fc61f20e0b86580/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039333734353530362d313137383232353430342e706e67
https://camo.githubusercontent.com/4ecc5cbbcce2a96d59af21b6424bdd68161832c5f5cbb5e663480c6670f9a3f6/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343035343433392d3534373736393238332e706e67
markOop.hpphttps://github.com/openjdk-mirror/jdk7u-hotspot/blob/50bdefc3afe944ca74c3093e7448d6b889cd20d1/src/share/vm/oops/markOop.hpp
https://camo.githubusercontent.com/0227b3ff798d77ba0bec417d5bf7ceb616e3debed8dfea7a20753ae064d3a2db/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343130333638312d313433383031343133302e706e67
https://github.com/wandeful/bestJavaer/blob/master/Users/mr.l/Library/Application Support/typora-user-images/image-20210530233842535.png
https://github.com/wandeful/bestJavaer/blob/master/Users/mr.l/Library/Application Support/typora-user-images/image-20210531093349681.png
https://github.com/wandeful/bestJavaer/blob/master/Users/mr.l/Library/Application Support/typora-user-images/image-20210530220010468.png
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#实例数据-instance-data
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#对齐-padding
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#锁的升级流程
https://camo.githubusercontent.com/7bb46aca9e6e574fa3fa117ea34a0e353adec8bbf8d39cb80bb22f578d6d9799/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343131343938362d3139393536313630352e706e67
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#无锁
https://camo.githubusercontent.com/e548534e19a6a6993dd1d6b950b0d49bff70e21672aa50bf30b905ca55d5ca2d/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343132393230372d313036313530343537342e706e67
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#偏向锁
https://camo.githubusercontent.com/c3b4f2d3f597073c8bdbaff3fb3fd7a2a04d88644cdeb0255fd4a549ee757579/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343133393131392d313336373037353835332e706e67
https://camo.githubusercontent.com/2fa0f6a12dc9db5b2d95d84d2c1aa3f24e921bddb8f7d4bfb361f1a25796edc6/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343134393534342d313335333634313030352e706e67
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#轻量级锁
https://camo.githubusercontent.com/d1e9587150b4a9f58f5ee4fb401c4946cf7ca8840d9616e5c47ca8408ff70fb0/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343230313739322d3232343838393039372e706e67
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#重量级锁
https://camo.githubusercontent.com/5cac9f6f5dc805fa388c22e9cef2f8fa30c2bcf324e343bd9ae9ea6baedd4a55/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343231333535322d313839323232373039352e706e67
https://camo.githubusercontent.com/de7cb4fd43fd7884e4b44ff4695b0822a951c936123fe96bcd7c425336e5a81c/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343232323630362d313936353732383438382e706e67
https://camo.githubusercontent.com/2319f46c084a43fe7ec9c343a38d0e0b79f69c0dd6eebdf24f6fcb888e321b00/68747470733a2f2f696d67323031382e636e626c6f67732e636f6d2f626c6f672f313531353131312f3230313931322f313531353131312d32303139313231373039343233313038382d3737333230333331332e706e67
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-代码块的底层实现
看完这篇Exception 和 Error,和面试官扯皮就没问题了https://mp.weixin.qq.com/s?__biz=MzkwMDE1MzkwNQ==&mid=2247495984&idx=1&sn=97c90237ae80d1a244bd34edf2628986&chksm=c04ae66ef73d6f78738ed1908e4e40bf3f179e1ec41b556aab7cfee3145b01f1316cd84e25c0&token=1037470091&lang=zh_CN#rd
https://github.com/wandeful/bestJavaer/blob/master/java-concurrent/java-synchronized.md#synchronized-修饰方法的底层原理
https://camo.githubusercontent.com/5257b29f1b8ce9abc4c09aecd1118e1c9f5dfa747e1ef7ef98005deb965da229/68747470733a2f2f747661312e73696e61696d672e636e2f6c617267652f3030386933736b4e6c7931677369766b62637a786f6a33316c32307438616c352e6a7067
https://camo.githubusercontent.com/12e654e93be0dc50b58a12ecb13cd541f27eb252eba30c4df07978b8150fcf08/68747470733a2f2f747661312e73696e61696d672e636e2f6c617267652f3030386933736b4e6c7931677369766c346b687a396a333164363068386d7a652e6a7067
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.