On Friday, January 21, 2011 14:12:18 Andrej Mitrovic wrote:
import std.stdio;
import std.concurrency;
void foo(int var)
{
}
bool bar(int var)
{
return true;
}
void barWrapper(int var)
{
bar(var);
}
void main()
{
spawn(foo, 1);
spawn(barWrapper, 1);
Sorry, I should be careful with the word side-effects. What I meant
was the newly spawned thread does its own job that the main thread
doesn't care much about. It doesn't touch main's state or any shared
variables. It does some work other than return a value. But the
function I wanted the new
On Friday, January 21, 2011 15:23:37 Andrej Mitrovic wrote:
Sorry, I should be careful with the word side-effects. What I meant
was the newly spawned thread does its own job that the main thread
doesn't care much about. It doesn't touch main's state or any shared
variables. It does some work