Mercurial > projects > ldc
view tests/mini/fiber.d @ 1558:3adcb70700cb
Added back option to disable metadata generation and users. Set USE_METADATA to OFF in ccmake.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Fri, 31 Jul 2009 11:28:31 +0200 |
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(); }