On Sat, 2012-08-04 at 21:03 +0200, David Nadlinger wrote:
[…]
> You are trying to pass a delegate which returns a delegate –
> this isn't going to work. ;)
But that is my whole point, it does a lot of the time, and it depends on
whether you are working with named functions and delegates or with
a
On Saturday, 4 August 2012 at 19:03:30 UTC, David Nadlinger wrote:
In your first example is that […]
Darn, make this »In your first example, …«.
On Saturday, 4 August 2012 at 15:23:39 UTC, Russel Winder wrote:
trial.d(7): Error: constructor core.thread.Thread.this (void
function()
fn, ulong sz = cast(ulong)0) is not callable using argument
types (void
delegate() delegate() pure nothrow @safe)
Failed: 'dmd' '-v' '-o-' 'trial.d' '-I.'
So
On 2012-08-04 18:41, Russel Winder wrote:
Isn't there an overload for function and one for delegate?
threadFunctionPointerUnnamed.d(5): Error: constructor core.thread.Thread.this
called with argument types:
((void function()))
matches both:
core.thread.Thread.this(void function
On Saturday, 4 August 2012 at 15:23:39 UTC, Russel Winder wrote:
[...]
I can do:
[...]
auto f() { return delegate () { writeln("Hello
World."); }; }
auto t = new Thread(f);
[...]
However:
[...]
auto t = new Thread( delegate () { return delegate ()
{ writeln("H
Jacob,
On Sat, 2012-08-04 at 18:02 +0200, Jacob Carlborg wrote:
> On 2012-08-04 17:06, Russel Winder wrote:
> > I am sure I am just missing something simple, but I need the nudge…
> >
> > I can do:
> >
> > import core.thread ;
> > import std.stdio ;
> >
> > int main(immu
On 2012-08-04 17:06, Russel Winder wrote:
I am sure I am just missing something simple, but I need the nudge…
I can do:
import core.thread ;
import std.stdio ;
int main(immutable string[] args) {
auto f() { return delegate () { writeln("Hello World."); };
I am sure I am just missing something simple, but I need the nudge…
I can do:
import core.thread ;
import std.stdio ;
int main(immutable string[] args) {
auto f() { return delegate () { writeln("Hello World."); }; }
auto t = new Thread(f);