Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #8611 > unrolled thread
| Started by | Gene Wirchenko <genew@ocis.net> |
|---|---|
| First post | 2011-11-24 14:29 -0800 |
| Last post | 2011-11-25 20:47 +0000 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.javascript
Timeouts and Thread(?) Interruption/Execution Gene Wirchenko <genew@ocis.net> - 2011-11-24 14:29 -0800
Re: Timeouts and Thread(?) Interruption/Execution "Richard Cornford" <Richard@litotes.demon.co.uk> - 2011-11-24 22:44 +0000
Re: Timeouts and Thread(?) Interruption/Execution Dr J R Stockton <reply1147@merlyn.demon.co.uk> - 2011-11-25 20:47 +0000
| From | Gene Wirchenko <genew@ocis.net> |
|---|---|
| Date | 2011-11-24 14:29 -0800 |
| Subject | Timeouts and Thread(?) Interruption/Execution |
| Message-ID | <n4htc7pvev38hjrea5vhvi9dj4r4u062ff@4ax.com> |
Dear JavaScripters:
Something else that the texts do not seem to cover:
Suppose that I have a form and a timeout. The form has
validation on the fields. If a timeout occurs during the execution of
validation code, what happens?
Is the validation code terminated? Interrupted then resumed
somehow? Executed in parallel with the timeout code?
Or is this undefined?
Sincerely,
Gene Wirchenko
[toc] | [next] | [standalone]
| From | "Richard Cornford" <Richard@litotes.demon.co.uk> |
|---|---|
| Date | 2011-11-24 22:44 +0000 |
| Message-ID | <aLadnSf--f8vVVPTnZ2dnUVZ7vGdnZ2d@giganews.com> |
| In reply to | #8611 |
Gene Wirchenko wrote: > Dear JavaScripters: > > Something else that the texts do not seem to cover: > > Suppose that I have a form and a timeout. The form has > validation on the fields. If a timeout occurs during the execution of > validation code, what happens? The timeout waits until the executing code finishes. > Is the validation code terminated? No. > Interrupted then resumed > somehow? No. > Executed in parallel with the timeout code? In principle, if a web page consisted of a frameset (or embedded IFRAMEs) so there were multiple ECMAScript global objects (one for each frame/window) and the timeout was set in one frame/window and the other code was executing in another then it may be possible for the two to execute in parallel, but I have not yet seen that possibility demonstrated in any actual environment (and I have seen test code that should have been able to demonstrate that behaviour if it did exist). > Or is this undefined? The specification makes no provision for the interruption of executing code or for parallel execution, and does not provide any of the tools that would be necessary in order to render doing that 'safe'. Richard.
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1147@merlyn.demon.co.uk> |
|---|---|
| Date | 2011-11-25 20:47 +0000 |
| Message-ID | <KsTtCqF57$zOFwJv@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #8611 |
In comp.lang.javascript message <n4htc7pvev38hjrea5vhvi9dj4r4u062ff@4ax. com>, Thu, 24 Nov 2011 14:29:49, Gene Wirchenko <genew@ocis.net> posted: > Suppose that I have a form and a timeout. The form has >validation on the fields. If a timeout occurs during the execution of >validation code, what happens? You need to realise that those who initially wrote JavaScript were in a country that never developed a language of its own, and is where people often use words with a flagrant disregard for their proper meaning. Especially in regard to date/time. "getTimezoneOffset", in JavaScript, means "getTimeOffset". "timeout" really means "delayed function call". There is no provision for, in the general sense, interrupting running script (the script can pause and restart, then looking for new information (such as STOP!)). The consequences of the impossible are undefined. My "validation" page includes a parameter-driven routine for doing most or all of the validation of a many-field form with a minimum (roughly) of new code. -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Website <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web