Date: Tue, 28 Jul 2009 09:48:44 +0200 (CEST) From: Johan Strom <johan@stromnet.se> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/137200: New Perl port: Async::MergePoint (fixes broken IO::Async) Message-ID: <20090728074844.1DA57158E1@back-1.stromnet.se> Resent-Message-ID: <200907280810.n6S8A3D6023080@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 137200 >Category: ports >Synopsis: New Perl port: Async::MergePoint (fixes broken IO::Async) >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Jul 28 08:10:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Johan >Release: FreeBSD 7.2-RELEASE-p2 amd64 >Organization: Stromnet >Environment: System: FreeBSD back-1.stromnet.se 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #8: Tue Jul 21 15:18:20 CEST 2009 johan@back-1.stromnet.se:/usr/obj/usr/src/sys/BACK1 amd64 >Description: With the latest IO::Async the MergePoint package was removed and is now located in Async::MergePoint instead of IO::Async::MergePoint. The port did not take this into account, so any code using IO::Async::ChildManager broke (since Async::MergePoint wasn't found). >How-To-Repeat: Try to run code using IO::Async::ChildManager >Fix: Add this port, and update p5-IO-Async to require p5-Async-MergePoint --- p5-Async-MergePoint.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # p5-Async-MergePoint # p5-Async-MergePoint/pkg-plist # p5-Async-MergePoint/distinfo # p5-Async-MergePoint/Makefile # p5-Async-MergePoint/pkg-descr # echo c - p5-Async-MergePoint mkdir -p p5-Async-MergePoint > /dev/null 2>&1 echo x - p5-Async-MergePoint/pkg-plist sed 's/^X//' >p5-Async-MergePoint/pkg-plist << 'ed8b2d5e5b7d8ca3833659fedaab7806' X%%SITE_PERL%%/Async/MergePoint.pm X@dirrmtry %%SITE_PERL%%/Async ed8b2d5e5b7d8ca3833659fedaab7806 echo x - p5-Async-MergePoint/distinfo sed 's/^X//' >p5-Async-MergePoint/distinfo << '68d0b4dae2f471e682d1e43a8b82de0b' XMD5 (Async-MergePoint-0.03.tar.gz) = f4a6f9a9dc0a1748f503c01893d544cc XSHA256 (Async-MergePoint-0.03.tar.gz) = 5e31b89c584b0bbacae3632245f16f5ebcfd6091abac87ae1970814d79e6a775 XSIZE (Async-MergePoint-0.03.tar.gz) = 14036 68d0b4dae2f471e682d1e43a8b82de0b echo x - p5-Async-MergePoint/Makefile sed 's/^X//' >p5-Async-MergePoint/Makefile << '3221ae2c2ece6e4cda134c1d6b393095' XPORTNAME= Async-MergePoint XPORTVERSION= 0.03 XCATEGORIES= devel perl5 XMASTER_SITES= CPAN XPKGNAMEPREFIX= p5- X XCOMMENT= Perl modules that resynchronise diverged control flow (earlier included in IO::Async) X XPERL_CONFIGURE= yes X XMAN3= Async::MergePoint.3 X X.include <bsd.port.mk> 3221ae2c2ece6e4cda134c1d6b393095 echo x - p5-Async-MergePoint/pkg-descr sed 's/^X//' >p5-Async-MergePoint/pkg-descr << '8dcdf646bc29518972bc1ab7e108a41b' XOften in program logic, multiple different steps need to be taken that Xare independent of each other, but their total result is needed before Xthe next step can be taken. In synchonous code, the usual approach is Xto do them sequentially. X XAn asynchronous or event-based program could do this, but if each step Xinvolves some IO idle time, better overall performance can often be Xgained by running the steps in parallel. A Async::MergePoint object Xcan then be used to wait for all of the steps to complete, before Xpassing the combined result of each step on to the next stage. X XA merge point maintains a set of outstanding operations it is waiting Xon; these are arbitrary string values provided at the object's Xconstruction. Each time the done() method is called, the named item is Xmarked as being complete. When all of the required items are so Xmarked, the on_finished continuation is invoked. X XFor use cases where code may be split across several different lexical Xscopes, it may not be convenient or possible to share a lexical Xvariable, to pass on the result of some asynchronous operation. In Xthese cases, when an item is marked as complete a value can also be Xprovided which contains the results of that step. The on_finished Xcallback is passed a hash (in list form, rather than by reference) of Xthe collected item values. X XThis module was originally part of the IO::Async distribution, but was Xremoved under the inspiration of Pedro Melo's Async::Hooks Xdistribution, because it doesn't itself contain anything IO-specific. X XWWW: http://search.cpan.org/dist/Async-MergePoint/ 8dcdf646bc29518972bc1ab7e108a41b exit --- p5-Async-MergePoint.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090728074844.1DA57158E1>