Changeset 2450
- Timestamp:
- 07/12/07 15:08:13 (1 year ago)
- Files:
-
- trunk/example/cluster/task.d (added)
- trunk/tango/net/cluster/NetworkCall.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tango/net/cluster/NetworkCall.d
r2446 r2450 14 14 15 15 private import tango.core.Traits; 16 private import tango.core.Thread; 17 18 private import tango.net.cluster.tina.Cluster; 19 20 private import tango.net.cluster.NetworkMessage; 16 21 17 22 protected import tango.io.protocol.model.IReader, … … 20 25 protected import tango.net.cluster.model.IChannel; 21 26 22 private import tango.net.cluster.NetworkMessage; 23 24 /******************************************************************************* 25 27 28 /******************************************************************************* 29 30 Interim bootstrap for cluster connectivity 31 32 *******************************************************************************/ 33 34 static this () 35 { 36 auto cluster = (new Cluster).join; 37 Thread.setLocal (0, cast(void*) cluster.createChannel("task")); 38 } 39 40 41 /******************************************************************************* 42 43 task harness, for initiating the send 26 44 27 45 *******************************************************************************/ … … 38 56 channel.execute (this); 39 57 else 40 execute; 58 { 59 auto x = cast(IChannel) Thread.getLocal(0); 60 if (x) 61 x.execute (this); 62 else 63 execute; 64 } 41 65 } 42 66 }












