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
Ah, I should have read the following parts where it describes thread
termination, in TDPL. Woops.
On 11/17/11, 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 = 1
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);
enforce(