Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/cml/src/core-cml/cleanup.sml
ViewVC logotype

Diff of /sml/trunk/src/cml/src/core-cml/cleanup.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 843, Tue Jun 19 21:53:04 2001 UTC revision 844, Wed Jun 20 20:39:15 2001 UTC
# Line 12  Line 12 
12    
13      val exportFnCleanup : unit -> unit      val exportFnCleanup : unit -> unit
14    
15        val chanCleaner : (string * when list * (when -> unit))
16        val servCleaner : (string * when list * (when -> unit))
17    
18    end = struct    end = struct
19    
20      datatype when = AtInit | AtInitFn | AtShutdown | AtExit      datatype when = AtInit | AtInitFn | AtShutdown | AtExit
# Line 77  Line 80 
80                    CML.joinEvt(CML.spawnc f when),                    CML.joinEvt(CML.spawnc f when),
81                    CML.timeOutEvt(Time.fromSeconds 1)                    CML.timeOutEvt(Time.fromSeconds 1)
82                  ]                  ]
83  (*DEBUG*  (*DEBUG
84  fun doCleaner (tag, _, f) = (  fun doCleaner (tag, _, f) = (
85  Debug.sayDebugTS(concat["do Cleaner \"", tag, "\"\n"]);  Debug.sayDebugTS(concat["do Cleaner \"", tag, "\"\n"]);
86  CML.select [  CML.select [
87  CML.wrap(CML.joinEvt(CML.spawnc f when), fn _ => Debug.sayDebugTS "  done\n"),  CML.wrap(CML.joinEvt(CML.spawnc f when), fn _ => Debug.sayDebugTS "  done\n"),
88  CML.wrap(CML.timeOutEvt(Time.fromSeconds 1), fn _ => Debug.sayDebugTS "  timeout\n")  CML.wrap(CML.timeOutEvt(Time.fromSeconds 1), fn _ => Debug.sayDebugTS "  timeout\n")
89  ])  ])
90  *DEBUG*)  DEBUG*)
91            in            in
92            (* remove uneccesary clean-up routines *)            (* remove uneccesary clean-up routines *)
93              case when              case when
# Line 193  Line 196 
196    (* clean the logged channels and mailboxes. *)    (* clean the logged channels and mailboxes. *)
197      fun cleanChannels _ = (appInit chanList; appInit mboxList)      fun cleanChannels _ = (appInit chanList; appInit mboxList)
198    
199    (* Add the standard cleaners *)    (* The standard cleaners *)
200      val _ = (      val chanCleaner = ("Channels&Mailboxes", [AtInit,AtShutdown], cleanChannels)
201            addCleaner ("Channels&Mailboxes", [AtInit,AtShutdown], cleanChannels);      val servCleaner = ("Servers", atAll, cleanServers)
           addCleaner ("Servers", atAll, cleanServers))  
202    
203    (* remove useless cleaners and clear the channel/mailbox logs    (* remove useless cleaners and clear the channel/mailbox logs
204     * prior to exporting a stand-alone CML program.     * prior to exporting a stand-alone CML program.

Legend:
Removed from v.843  
changed lines
  Added in v.844

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0