Title: Codes · Issue #178 · ActiveState/code · GitHub
Open Graph Title: Codes · Issue #178 · ActiveState/code
X Title: Codes · Issue #178 · ActiveState/code
Description: public class DeadlockExample { public static Object Lock1 = new Object(); public static Object Lock2 = new Object(); public static void main(String[] args) { ThreadDemo1 T1 = new ThreadDemo1(); ThreadDemo2 T2 = new ThreadDemo2(); T1.star...
Open Graph Description: public class DeadlockExample { public static Object Lock1 = new Object(); public static Object Lock2 = new Object(); public static void main(String[] args) { ThreadDemo1 T1 = new ThreadDemo1(); Thr...
X Description: public class DeadlockExample { public static Object Lock1 = new Object(); public static Object Lock2 = new Object(); public static void main(String[] args) { ThreadDemo1 T1 = new ThreadDemo1(); Thr...
Opengraph URL: https://github.com/ActiveState/code/issues/178
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Codes","articleBody":"public class DeadlockExample {\n public static Object Lock1 = new Object();\n public static Object Lock2 = new Object();\n\n public static void main(String[] args) {\n ThreadDemo1 T1 = new ThreadDemo1();\n ThreadDemo2 T2 = new ThreadDemo2();\n T1.start();\n T2.start();\n }\n\n private static class ThreadDemo1 extends Thread {\n public void run() {\n synchronized (Lock1) {\n System.out.println(\"Thread 1: Holding lock 1...\");\n try {\n Thread.sleep(10);\n } catch (InterruptedException e) {}\n System.out.println(\"Thread 1: Waiting for lock 2...\");\n synchronized (Lock2) {\n System.out.println(\"Thread 1: Holding lock 1 \u0026 2...\");\n }\n }\n }\n }\n\n private static class ThreadDemo2 extends Thread {\n public void run() {\n synchronized (Lock2) { // Swapped lock order creates deadlock potential\n System.out.println(\"Thread 2: Holding lock 2...\");\n try {\n Thread.sleep(10);\n } catch (InterruptedException e) {}\n System.out.println(\"Thread 2: Waiting for lock 1...\");\n synchronized (Lock1) {\n System.out.println(\"Thread 2: Holding lock 2 \u0026 1...\");\n }\n }\n }\n }\n}\n","author":{"url":"https://github.com/siddharthrgade21-a11y","@type":"Person","name":"siddharthrgade21-a11y"},"datePublished":"2025-12-24T04:24:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/178/code/issues/178"}
| 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:c60419e4-8b23-e9c7-bb33-cc315f120cb6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABF6:17997A:8764F:B6BB8:6969A30E |
| html-safe-nonce | b397a77407b08ffa067ad2b889922e38164304e39dcaaf6a54d463a55b54bff8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkY2OjE3OTk3QTo4NzY0RjpCNkJCODo2OTY5QTMwRSIsInZpc2l0b3JfaWQiOiI4MjI1MjY2MzIzODcyNjU0MDk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 12476c5716235190bc7866973d881df972079b6e58e764e228dde0d5be5869bd |
| hovercard-subject-tag | issue:3759173446 |
| 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/ActiveState/code/178/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4a81aa488eb429ce4b8a99161acd8c62171a7fc68f2d62b64763a520c6339147/ActiveState/code/issues/178 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4a81aa488eb429ce4b8a99161acd8c62171a7fc68f2d62b64763a520c6339147/ActiveState/code/issues/178 |
| og:image:alt | public class DeadlockExample { public static Object Lock1 = new Object(); public static Object Lock2 = new Object(); public static void main(String[] args) { ThreadDemo1 T1 = new ThreadDemo1(); Thr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | siddharthrgade21-a11y |
| hostname | github.com |
| expected-hostname | github.com |
| None | 24c4c97a2d520cb286b35e1a4c22d7a4df3c26a2fa28dd7cdf0e65db327b4de7 |
| turbo-cache-control | no-preview |
| go-import | github.com/ActiveState/code git https://github.com/ActiveState/code.git |
| octolytics-dimension-user_id | 319781 |
| octolytics-dimension-user_login | ActiveState |
| octolytics-dimension-repository_id | 98225960 |
| octolytics-dimension-repository_nwo | ActiveState/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 98225960 |
| octolytics-dimension-repository_network_root_nwo | ActiveState/code |
| 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 | 124667f43168afb6c9c03b7c02eb5b1d2e1be3d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width