Commits

Anonymous committed d09bebc

Merging from PAGODA branch to top of tree in preparation for release of
cf-0.4 package.

Comments (0)

Files changed (7)

     cf_parser.cmx cf_seq.cmx cf_uri.cmi 
 t/t_cf.cmo: cf_cmonad.cmi cf_deque.cmi cf_flow.cmi cf_gadget.cmi \
     cf_gregorian.cmi cf_ip4_addr.cmi cf_ip6_addr.cmi cf_ip_common.cmi \
-    cf_lexer.cmi cf_message.cmi cf_ordered.cmi cf_parser.cmi cf_poll.cmi \
-    cf_rbtree.cmi cf_scan_parser.cmi cf_scmonad.cmi cf_seq.cmi cf_stdtime.cmi \
-    cf_tai64.cmi cf_tai64n.cmi cf_tcp4_socket.cmi cf_tcp6_socket.cmi \
-    cf_uri.cmi 
+    cf_journal.cmi cf_lexer.cmi cf_message.cmi cf_ordered.cmi cf_parser.cmi \
+    cf_poll.cmi cf_rbtree.cmi cf_scan_parser.cmi cf_scmonad.cmi cf_seq.cmi \
+    cf_stdtime.cmi cf_tai64.cmi cf_tai64n.cmi cf_tcp4_socket.cmi \
+    cf_tcp6_socket.cmi cf_uri.cmi 
 t/t_cf.cmx: cf_cmonad.cmx cf_deque.cmx cf_flow.cmx cf_gadget.cmx \
     cf_gregorian.cmx cf_ip4_addr.cmx cf_ip6_addr.cmx cf_ip_common.cmx \
-    cf_lexer.cmx cf_message.cmx cf_ordered.cmx cf_parser.cmx cf_poll.cmx \
-    cf_rbtree.cmx cf_scan_parser.cmx cf_scmonad.cmx cf_seq.cmx cf_stdtime.cmx \
-    cf_tai64.cmx cf_tai64n.cmx cf_tcp4_socket.cmx cf_tcp6_socket.cmx \
-    cf_uri.cmx 
+    cf_journal.cmx cf_lexer.cmx cf_message.cmx cf_ordered.cmx cf_parser.cmx \
+    cf_poll.cmx cf_rbtree.cmx cf_scan_parser.cmx cf_scmonad.cmx cf_seq.cmx \
+    cf_stdtime.cmx cf_tai64.cmx cf_tai64n.cmx cf_tcp4_socket.cmx \
+    cf_tcp6_socket.cmx cf_uri.cmx 
 released versions of the library.
 
 
+===== Version 0.4 =====
+
+Highlights of the changes:
+
++ Fix Makefile for architectures that do not support native compilers.
++ Fix major bug in the [Cf_gadget] scheduler that caused some wires to be
+  prematurely collected without delivering events to their receivers.
+
+--- [Cf_gadget]
+    Fix major bug in the scheduler.  Events transmitted on wires that are no
+    longer connected to a receiver are now delivered to any pending guards that
+    were queued before the receiver was collected.  Minor changes to the
+    debugging hints to use Cf_journal.
+
+--- [Makefile]
+    Samuel Mimram, the Debain maintainer of this package, says: There are some
+    minor issues with your Makefile concerning non-native archs [...]:
+    - the doc rule should use ocamldoc instead of ocamldoc.opt since it is
+    not available on all archs (or add a optdoc rule);
+    - the install rule should not depend on cf.cmxa and cf.a since they are
+    not necessarly built.
+    Thanks to Mr. Mimram for catching this.
+
+
 ===== Version 0.3 =====
 
 Highlights of the changes:
 Open issues in development:
 
++ (Makefile): Samuel Mimram, the Debain maintainer of this package, says:
+
+    There are some minor issues with your Makefile concerning non-native
+    archs that you might want to correct for the next release (no need to
+    make a new release just for that):
+    - the doc rule should use ocamldoc instead of ocamldoc.opt since it is
+    not available on all archs (or add a optdoc rule);
+    - the install rule should not depend on cf.cmxa and cf.a since they are
+    not necessarly built.
+
 + (Cf_socket_p): No support for WIN32.  SVR4 remains untested, but portability
     has been substantially improved.  Suse Linux 9.0 works.
 
     for a given base path.
 
 + (Unimplemented): Support for I18N and locales.  Need timezones especially.
+    The rest we can probably defer to the nice people working on Camomile.
 
 # End of open issues
 # The following META file is a guess by ocamlfind:
 name="cf"
-version="0.3"
+version="0.4"
 description="Pagoda Core Foundation"
 requires="unix"
 archive(byte)="cf.cma"
 cf.cmxa cf.a : libcf.a dllcf.so $(CF_CMI_FILES) $(CF_CMX_FILES) $(CF_O_FILES)
 	$(OCAMLMKLIB) -o cf $(CF_CMX_FILES) -lcf
 
-install:: libcf.a dllcf.so cf.cma cf.cmxa cf.a
+install:: libcf.a dllcf.so cf.cma
 	{ test ! -f cf.cmxa || extra="cf.cmxa cf.a"; }; \
 	ocamlfind install cf \
 	  $(CF_MLI_FILES) $(CF_CMI_FILES) $(CF_P_H_FILES) \
 
 doc::
 	@mkdir -p doc
-	ocamldoc.opt -v -d doc -html -colorize-code -m A $(DOC_SOURCES)
+	ocamldoc -v -d doc -html -colorize-code -m A $(DOC_SOURCES)
 
 ###############################################################################
 
   OF THE POSSIBILITY OF SUCH DAMAGE. 
  *---------------------------------------------------------------------------*)
 
-(**)
+(*
+let jout = Cf_journal.stdout
+*)
+
+(*
 module type X_tag = sig
     val tag: string
 end
 end
 
 module X = X_create(struct let tag = "Cf_gadget" end)
-(**)
+*)
 
 type ('i, 'o) kernel_t = {
     k_rdyQ_: ('i, 'o) work0_t Lazy.t Queue.t;
             Queue.add rdy k.k_rdyQ_;
         | M_blocked (txLst, gLst) ->
             List.iter begin fun (tx0, getF) ->
-                Queue.add { x0_txLst_ = txLst; x0_getF_ = getF } tx0.tx0_gateQ_
+                let g = { x0_txLst_ = txLst; x0_getF_ = getF } in
+                Queue.add g tx0.tx0_gateQ_
             end gLst
     end;
     scheduler_ k
             's. 'x -> ('s, 'i, 'o, unit) t =
             fun obj f c1 s k c0 ->
                 begin
-                    match Weak.get tx0_.tx0_rxPtr_ 0 with
-                    | None ->
-                        Queue.clear tx0_.tx0_gateQ_
-                    | Some rx0 ->
-                        try
-                            let x0 = Queue.take tx0.tx0_gateQ_ in
-                            let x0: (Obj.t, 'i, 'o) guard0_t = Obj.magic x0 in
-                            let obj = Obj.repr obj in
-                            List.iter begin fun tx0 ->
-                                let q = Queue.create () in
-                                Queue.iter begin fun x0' ->
-                                    if x0'.x0_txLst_ != x0.x0_txLst_ then
-                                        Queue.add x0' q
-                                end tx0.tx0_gateQ_;
-                                Queue.clear tx0.tx0_gateQ_;
-                                Queue.transfer q tx0.tx0_gateQ_
-                            end x0.x0_txLst_;
-                            Queue.add (lazy (x0.x0_getF_ obj)) k.k_rdyQ_;
-                        with
-                        | Queue.Empty ->
+                    try
+                        let x0 = Queue.take tx0.tx0_gateQ_ in
+                        let x0: (Obj.t, 'i, 'o) guard0_t = Obj.magic x0 in
+                        let obj = Obj.repr obj in
+                        List.iter begin fun tx0 ->
+                            let q = Queue.create () in
+                            Queue.iter begin fun x0' ->
+                                if x0'.x0_txLst_ != x0.x0_txLst_ then
+                                    Queue.add x0' q
+                            end tx0.tx0_gateQ_;
+                            Queue.clear tx0.tx0_gateQ_;
+                            Queue.transfer q tx0.tx0_gateQ_
+                        end x0.x0_txLst_;
+                        Queue.add (lazy (x0.x0_getF_ obj)) k.k_rdyQ_
+                    with
+                    | Queue.Empty ->
+                        match Weak.get tx0_.tx0_rxPtr_ 0 with
+                        | None ->
+                            Queue.clear tx0_.tx0_gateQ_
+                        | Some rx0 ->
                             Queue.add obj rx0.rx0_pendQ_
                 end;
                 Queue.add (lazy (f () c1 s)) k.k_rdyQ_;
 
 Random.self_init ();;
 
+(**)
+let jout = Cf_journal.stdout;;
+jout#setlimit `None;;
+(**)
+
 (*
 Gc.set {
     (Gc.get ()) with