[58708] users/toby/objcports/misc/depstree.c

toby at macports.org toby at macports.org
Fri Oct 2 21:54:57 PDT 2009


Revision: 58708
          http://trac.macports.org/changeset/58708
Author:   toby at macports.org
Date:     2009-10-02 21:54:57 -0700 (Fri, 02 Oct 2009)
Log Message:
-----------
add comments

Modified Paths:
--------------
    users/toby/objcports/misc/depstree.c

Modified: users/toby/objcports/misc/depstree.c
===================================================================
--- users/toby/objcports/misc/depstree.c	2009-10-03 04:53:45 UTC (rev 58707)
+++ users/toby/objcports/misc/depstree.c	2009-10-03 04:54:57 UTC (rev 58708)
@@ -357,17 +357,25 @@
 	print_queue = dispatch_queue_create("CFShow", NULL);
 
 	for (;;) {
+		// limit concurrency to jobs
 		dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
 
+		// find_next does postorder tree traversal to find the next
+		// "available" port - i.e. a port with no children that isn't
+		// already being built
 		port = find_next(portctx);
 
 		if (port) {
 			dispatch_async(dispatch_get_global_queue(0, 0), ^{
+				// fake build
 				fprintf_cf(stderr, "start %@\n", port);
 				usleep(random() / 1000);
 				fprintf_cf(stderr, "done %@\n", port);
 
+				// finish_port removes all matching ports
+				// from the build tree
 				finish_port(portctx, port);
+
 				CFRelease(port);
 				dispatch_semaphore_signal(sema);
 			});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091002/0ee36a18/attachment.html>


More information about the macports-changes mailing list