This is an example from TDPL:
import std.concurrency;
import std.exception;
import std.stdio;
void main()
{
auto low = 0;
auto high = 100;
auto tid = spawn(writer);
foreach (i; low .. high)
{
writeln(Main thread: , i);
tid.send(thisTid, i);
Ah, I should have read the following parts where it describes thread
termination, in TDPL. Woops.
On 11/17/11, Andrej Mitrovic andrej.mitrov...@gmail.com wrote:
This is an example from TDPL:
import std.concurrency;
import std.exception;
import std.stdio;
void main()
{
auto low = 0;
On Thursday, November 17, 2011 11:56 Andrej Mitrovic wrote:
This is an example from TDPL:
import std.concurrency;
import std.exception;
import std.stdio;
void main()
{
auto low = 0;
auto high = 100;
auto tid = spawn(writer);
foreach (i; low .. high)
{
writeln(Main thread: , i);