defer
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | defer [2006/08/01 03:13] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: defer.txt,v 1.3 2006/08/01 02:17:03 sthalik Exp $ | ||
+ | ======Synopsis: | ||
+ | __defer__ {< | ||
+ | |||
+ | ======Description: | ||
+ | The __DEFER__ command schedules < | ||
+ | the client is idle, and there is no risk that if < | ||
+ | something that it would crash the client. | ||
+ | |||
+ | Any time you want to destroy something, whether it be a DCC, a server, a open | ||
+ | file, an /[[on]], a window, a log file, etc, you always run the risk that some | ||
+ | alias further down the stack might have done a /wait or a /[[pause]] or a | ||
+ | / | ||
+ | is possible that if you destroy that thing, and then the /[[wait]] or | ||
+ | /[[pause]] or / | ||
+ | might try to use the object, which you destroyed, and thus it will crash the | ||
+ | client. | ||
+ | |||
+ | Now, I'm not saying that such cases are " | ||
+ | issues that may result in it being dangerous for you to destroy something | ||
+ | at certain times. | ||
+ | your script can crash the client by deleting something, the first thing | ||
+ | you should try is to put a /DEFER in front of the command to see if that | ||
+ | fixes it. | ||
+ | |||
+ | Obviously, if you /DEFER destroying something, it won't be destroyed | ||
+ | immediately, | ||
+ | the object is actually destroyed before you continue. | ||
+ | |||
+ | ======Example 1:====== | ||
+ | Here's an example that will malfunction on many versions: | ||
+ | |||
+ | ON #401 -1 * { on 401 - } | ||
+ | ON ^401 * { echo -- 401 hooked! $* | ||
+ | whois doesnotexist | ||
+ | |||
+ | The reason why this crashes is because the -1 serial numbered on deletes | ||
+ | both on's, but the /[[ON]] system still has a pointer to the second on and | ||
+ | still intends to run it, even after it's been deleted. | ||
+ | particular bug has been fixed in recent versions, it's an example of the | ||
+ | kind of destruction that could cause a crash. | ||
+ | |||
+ | So in the above example, this is the " | ||
+ | |||
+ | ON #401 -1 * { defer on 401 - } | ||
+ | ON ^401 * { echo -- 401 hooked! $* | ||
+ | whois doesnotexist | ||
+ | |||
+ | But obviously this means that the second /[[on]] will execute. | ||
+ | reasonable, portable, crash-proof way to destroy an /[[on]] so it will not run | ||
+ | from a lower numbered serial number.) | ||
+ | |||
+ | ======Example 2:====== | ||
+ | It doesn' | ||
+ | probably should /DEFER it. | ||
+ | |||
+ | ======History: | ||
+ | The __DEFER__ command first appeared in EPIC4-0.9.16. | ||
+ | |||
defer.txt · Last modified: 2006/08/01 03:13 by 127.0.0.1