Mercurial > projects > ldc
view tests/mini/fiber.d @ 970:fb31a4afa2df
Revert wilsonk's "fix" for the callingconv1.d problem.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Mon, 16 Feb 2009 23:56:56 +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(); }