View/Edit #3873:update_data

Switch to edit mode.

Name(s): update_data
1:  if (this.task_update_data == "go")
2:    return
3:  elseif (this.task_update_data == "fork")
4:    this.task_update_data = "go"
5:  else
6:    this.task_update_data = "fork"
7:    fork (0)
8:      this:update_data()
9:    endfork
10:   return
11: endif
12: this.tasks_left = this.tasks_room
13: while (this.tasks_left)
14:   this.task_running = currt = this.tasks_left[1]
15:   {dobj, task_name} = currt[1..2]
16:   ok = 1
17:   if (length(currt) > 2)
18:     delay = currt[3]
19:     m = $list_utils:iassoc(task_name, this.delay_times)
20:     if (!m)
21:       this.delay_times = {@this.delay_times, {task_name, time()}}
22:     elseif (time() - delay < this.delay_times[m][2])
23:       ok = 0
24:     else
25:       this.delay_times[m][2] = time()
26:     endif
27:   endif
28:   this.tasks_left = listdelete(this.tasks_left, 1)
29:   if (ok)
30:     try
31:       dobj:(task_name)()
32:     except e (ANY)
33:       this.task_update_data = 0
34:       this.owner:tell("[Isolation] ", this.task_running[1], ":", this.task_running[2], " appears to be broke.")
35:       return this.owner:tell("[Isolation] ", toliteral(e))
36:     endtry
37:   endif
38:   suspend(this.delay_typical)
39: endwhile
40: this.task_update_data = 0
41: "Last modified by Dax (#789) on Wed Jan 24 17:28:24 2007 EST."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Samson (#9131)

You are not logged in.

[home | help | who | search | setup | code]