Title: Add Wait() method to the script host to allow blocking scripts until the app domain is torn down or ctrl+c is pressed. · Issue #685 · scriptcs/scriptcs · GitHub
Open Graph Title: Add Wait() method to the script host to allow blocking scripts until the app domain is torn down or ctrl+c is pressed. · Issue #685 · scriptcs/scriptcs
X Title: Add Wait() method to the script host to allow blocking scripts until the app domain is torn down or ctrl+c is pressed. · Issue #685 · scriptcs/scriptcs
Description: Now that we have watching we need a way to block scripts from existing whether watching is enabled or not. Using Console.ReadLine() as we do in some of our samples wont' work with -watch as the app domain is not teared down until the scr...
Open Graph Description: Now that we have watching we need a way to block scripts from existing whether watching is enabled or not. Using Console.ReadLine() as we do in some of our samples wont' work with -watch as the app...
X Description: Now that we have watching we need a way to block scripts from existing whether watching is enabled or not. Using Console.ReadLine() as we do in some of our samples wont' work with -watch as the...
Mail addresses
notifications@github.com
notifications@github.com
glenn.block@gmail.com
notifications@github.com
Opengraph URL: https://github.com/scriptcs/scriptcs/issues/685
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add Wait() method to the script host to allow blocking scripts until the app domain is torn down or ctrl+c is pressed.","articleBody":"Now that we have watching we need a way to block scripts from existing whether watching is enabled or not. Using Console.ReadLine() as we do in some of our samples wont' work with -watch as the app domain is not teared down until the script finishes.\n\nSo, here is my proposal.\n- We add a ManualResetEvent under the hood with is created before the script executes. ManualResetEvent can be marshalled by ref so it can work across the app domain boundary.\n- A new Wait() method on the host will call Wait() on the underlying event.\n- When ever a change is detected and the script is going to be torn down, we set the event.\n- This will cause the script to continue executing allowing cleanup to run (like shutting down a web api) and for the script to exit.\n- The app domain will then be recycle restarting the process.\n\nThe other advantage of this approach is it will allow blocking until ctrl+c is pressed, which is more desirable for a production scenario.\n","author":{"url":"https://github.com/glennblock","@type":"Person","name":"glennblock"},"datePublished":"2014-05-11T19:15:11Z","url":"https://github.com/scriptcs/scriptcs/issues/685"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:9dfea9b2-adb5-9101-4a78-0212d65b3db4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E112:381DB6:13FEB2E:1A2A9AC:6B000A10 |
| html-safe-nonce | 7a1348f97df2fd458638b308df5b7003f28852f1c4d6d9ccad59d63aabf106f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTEyOjM4MURCNjoxM0ZFQjJFOjFBMkE5QUM6NkIwMDBBMTAiLCJ2aXNpdG9yX2lkIjoiNDkxMTc0MjcyMTk2Nzc4NjUxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 240cd3f1a92badcf65751f12a22befe615704c2995910654a0cb90c16f10fee1 |
| hovercard-subject-tag | issue:33268135 |
| 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/scriptcs/scriptcs/685/issue_layout |
| twitter:image | https://opengraph.githubassets.com/26accdafbed2cc15881dc2f084a04cfbc41a757a1b233d2d8484c978021e7f5f/scriptcs/scriptcs/issues/685 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/26accdafbed2cc15881dc2f084a04cfbc41a757a1b233d2d8484c978021e7f5f/scriptcs/scriptcs/issues/685 |
| og:image:alt | Now that we have watching we need a way to block scripts from existing whether watching is enabled or not. Using Console.ReadLine() as we do in some of our samples wont' work with -watch as the app... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | glennblock |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/scriptcs/scriptcs git https://github.com/scriptcs/scriptcs.git |
| octolytics-dimension-user_id | 3758046 |
| octolytics-dimension-user_login | scriptcs |
| octolytics-dimension-repository_id | 8473240 |
| octolytics-dimension-repository_nwo | scriptcs/scriptcs |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 8473240 |
| octolytics-dimension-repository_network_root_nwo | scriptcs/scriptcs |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width