Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!caip!clyde!cbatt!cbosgd!ihnp4!wucs!meh From: meh@wucs.UUCP (Mark E Hunter) Newsgroups: net.lang.c++ Subject: Co-routines in C++ Message-ID: <1743@wucs.UUCP> Date: Thu, 28-Aug-86 14:42:02 EDT Article-I.D.: wucs.1743 Posted: Thu Aug 28 14:42:02 1986 Date-Received: Sun, 31-Aug-86 05:04:48 EDT Reply-To: meh@wucs.UUCP (Mark E Hunter) Organization: Washington U. in St. Louis Lines: 28 Hello, Can anyone tell me why the message sector 2 gets printed twice? Here is the source: #include "task.h" class pc : task { pc(int); }; pc::pc(int n) { printf("pc %d\n",n); }; main() { int n; printf("sector 1\n"); n = 1; new pc(n); printf("sector 2\n"); thistask->sleep(); } And here is the output sector 1 pc 1 sector 2 sector 2