-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The X10 spec provides two examples, how 'when' cannot be implemented
with 'if' and 'atomic'. However, an additional loop seems to do the trick:

  when (G) S;

==into==>

  while (true) {
    atomic {
      if (G) {
        S;
        break;
      }
    }
    // wait for some atomic to finish //
  }

For my simple test, it seems to work, but concurrency is tricky. ;)

- -- 
Andreas Zwinkau

 Karlsruhe Institute of Technology (KIT)
 Institut für Programmstrukturen und Datenorganisation (IPD)
 Lehrstuhl Prof. Snelting
 Adenauerring 20a
 76131 Karlsruhe

 Phone:  +49 721 608 48351
 Fax:    +49 721 608 48457
 Email:  zwin...@kit.edu
 Web:    http://pp.info.uni-karlsruhe.de/person.php?id=107

 KIT – University of the State of Baden-Wuerttemberg and
 National Research Center of the Helmholtz Association
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJP2YlSAAoJEKm3M8a3pi2i24MH/2lhvl3V5nYmREh2MK5fQPHj
iM6Me+lGqfL7V3qXP4aN9rkazQXnf/agbjMu/x9hCMoS5E/gj45KfCal2+23YsYN
eoaU5QZnJNvEYMb93hbaHA4XRg0FjIaTBT/PpiIezjD1EcG7bWPWzdlgyQGDP/9Z
UfdQngWiblOYOZb97sW0/XMu87R0isxg1PVdaWh0bPbbPTgrYDeqcL+nwXVTOSI3
bxXAogYU31a+TQCjIxseqObZgSX+mTcNoeN9Gs0b1isOt059cdNnmizzvGIwlW/y
8Q0NfbpuhAzDQD9HaPlYetVjaeARO9peEcO4LJ4oTBTWxgTtGrzg5yJGUFUBKYw=
=meq/
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to