Revision: 3777 http://vexi.svn.sourceforge.net/vexi/?rev=3777&view=rev Author: mkpg2 Date: 2010-01-15 18:18:53 +0000 (Fri, 15 Jan 2010)
Log Message: ----------- New function 'forward()'. Single direction sync function. Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/vexi/util/sync.t Modified: trunk/widgets/org.vexi.widgets/src/vexi/util/sync.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/vexi/util/sync.t 2010-01-15 18:15:51 UTC (rev 3776) +++ trunk/widgets/org.vexi.widgets/src/vexi/util/sync.t 2010-01-15 18:18:53 UTC (rev 3777) @@ -31,6 +31,22 @@ // else o[key] = true; // }; + static.forward = function(a,b,ka,kb){ + if(!kb) kb = ka; + var fromA = false; + + var writeA = function(v) { + cascade = v; + if(fromB) return; + fromA = true; + try { b[kb] = v; } + finally { fromA = false; } + }; + + + a[ka] ++= writeA; + }; + static.sync = function(a,b,ka,kb){ if(!kb) kb = ka; var fromA = false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn