2000-01-30 10:44:33 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2000-09-07 20:35:15 +00:00
|
|
|
#include "glib.h"
|
2000-01-30 10:44:33 +00:00
|
|
|
#include "cothreads.h"
|
|
|
|
#include "object.h"
|
|
|
|
#include "looper.h"
|
|
|
|
|
2000-09-07 20:35:15 +00:00
|
|
|
cothread_context *ctx;
|
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
int main(int argc,char *argv[]) {
|
|
|
|
looper *l1,*l2;
|
|
|
|
|
2000-09-07 20:35:15 +00:00
|
|
|
ctx = cothread_init();
|
|
|
|
|
2000-01-30 10:44:33 +00:00
|
|
|
l1 = looper_create("looperone",1,ctx);
|
|
|
|
l2 = looper_create("loopertwo",0,ctx);
|
|
|
|
object_setpeer(OBJECT(l1),OBJECT(l2));
|
|
|
|
|
|
|
|
fprintf(stderr,"about to start l1\n\n");
|
2000-09-07 20:35:15 +00:00
|
|
|
while (1)
|
|
|
|
object_start(l1);
|
2000-01-30 10:44:33 +00:00
|
|
|
}
|