view tests/mini/fiber.d @ 772:cd7da2ba14d1

Fix bug reported by downs. Related to delegate types within tuple template parameters.
author Christian Kamm <kamm incasoftware de>
date Tue, 18 Nov 2008 17:14:57 +0100
parents 4ac97ec7c18e
children
line wrap: on
line source

private import tango.core.Thread;

extern(C) void printf(char*, ...);

void foo()
{
		printf("-- I am here\n");
		Fiber.yield();
		printf("-- Now I am here\n");
}

void main()
{
	Fiber f = new Fiber(&foo);

	printf("Running f once\n");
	f.call();
	printf("Running f again\n");
	f.call();
}