Changeset 2451
- Timestamp:
- 07/12/07 15:58:27 (1 year ago)
- Files:
-
- trunk/example/cluster/tclient.d (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/example/cluster/tclient.d
r2449 r2451 3 3 4 4 *******************************************************************************/ 5 6 import Add; 5 7 6 8 import tango.io.Stdout; … … 9 11 10 12 import tango.util.log.Configurator; 11 12 import tango.net.cluster.tina.Cluster;13 14 import Add;15 13 16 14 /******************************************************************************* … … 21 19 void main (char[][] args) 22 20 { 23 auto cluster = (new Cluster).join;24 auto channel = cluster.createChannel ("rpc.channel");25 26 21 // an implicit task instance 27 22 auto add = new NetCall!(add); … … 36 31 for (int i=10000; i--;) 37 32 { 38 // both task s are used in the same manner39 add (1, 2 , channel);40 sub (3, 4 , channel);33 // both task types are used in the same manner 34 add (1, 2); 35 sub (3, 4); 41 36 } 42 37 Stdout.formatln ("{} calls/s", 20000/w.stop);












