Mercurial > projects > ldc
view tests/mini/fiber.d @ 714:1e98c99a87cb
Updated Rebuild profile to use correct linker switches
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 13:48:54 +0200 |
parents | c2a342b5d8e5 |
children | 4ac97ec7c18e |
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(); }