Mercurial > projects > ldc
view tests/mini/fiber.d @ 1447:a400b1dd657f
fix assembly code for mingw32 in minitests
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Sun, 31 May 2009 11:01:02 -0600 |
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(); }