sync a //defines a "sync group" // any two parts of a sync group can not run at the same time n = counter() part1 = ?g part2 = ?g -> if n > 10 { a[part1] { // ... part [1] of sync group a } } else { a[part2] { // ... part [2] of sync group a } } if n == 12 { // since this could happen at the // same time as a[1] (bacause of the ->) // this must also be a[1] a[part1] { // ... } } // if a sync group has only one part it will be optimized away // in a situation like this a[1] { b[1] { //... } } a[1] { b[2] { //... } } b[3] { //... } // sync group a can be optimized away // FURTHER STUFF: // a synchronous macro is defined like this m = sync (arguments) { // ... } // a synchronous macro is assumed to be done when it returns, // so its triggers can be toggled off // if it is called with a -> it is not assumed to be sync anymore // if it should still be sync with a ->, // the tag #[force_sync] can be applied