Title: Codes · Issue #182 · ActiveState/code · GitHub
Open Graph Title: Codes · Issue #182 · ActiveState/code
X Title: Codes · Issue #182 · 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/182
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: Has Lock1\");\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {}\n System.out.println(\"Thread 1: Waiting for Lock2\");\n synchronized (Lock2) {\n System.out.println(\"Thread 1: Has Lock2\");\n }\n }\n }\n }\n \n private static class ThreadDemo2 extends Thread {\n public void run() {\n synchronized (Lock2) { // Changed to Lock2 first to cause deadlock\n System.out.println(\"Thread 2: Has Lock2\");\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {}\n System.out.println(\"Thread 2: Waiting for Lock1\");\n synchronized (Lock1) {\n System.out.println(\"Thread 2: Has Lock1\");\n }\n }\n }\n }\n}\n","author":{"url":"https://github.com/siddharthrgade21-a11y","@type":"Person","name":"siddharthrgade21-a11y"},"datePublished":"2026-01-05T04:30:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/182/code/issues/182"}
| 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:d5e63e66-565e-1b0c-dfaa-a1561bfcd5b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6DC:14F6C1:B10567:F46485:69695B03 |
| html-safe-nonce | 9d1a401779db61160cab33fce9d0c324783fb0a3e15f50ad53462148490050fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkRDOjE0RjZDMTpCMTA1Njc6RjQ2NDg1OjY5Njk1QjAzIiwidmlzaXRvcl9pZCI6IjczNTIzNDY3ODU0MDI2NzM5MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | aae7f1432ec8e3ced71b702bf2a900c66689fdf9e9d91cb1b1fb1ffa0c89380a |
| hovercard-subject-tag | issue:3780131849 |
| 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/182/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0819554c8b4a67840c70c37763f0bb04ed9faaf63bfb7b0ef8edad1fb73639b1/ActiveState/code/issues/182 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0819554c8b4a67840c70c37763f0bb04ed9faaf63bfb7b0ef8edad1fb73639b1/ActiveState/code/issues/182 |
| 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 | 9db5f28da7e24035385d7f349f17890cbe016a939ddd7952be0f07b862094f5a |
| 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 | 4e59fe66217d3c72925af2a341ae3a8f2b5b5b2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width