--- deliantra/server/include/cfperl.h 2006/12/31 10:28:36 1.44 +++ deliantra/server/include/cfperl.h 2007/01/01 00:41:03 1.46 @@ -250,7 +250,7 @@ *p = '\n'; } - void put (keyword k, const char *v) + void put (keyword k, const char *v = 0) { put_string (k, v); } @@ -386,6 +386,19 @@ static int nready () { return CORO_NREADY; } static int cede () { return CORO_CEDE ; } + + static int cede_counter; + + static void cede_every (int count) + { + if (++cede_counter >= count) + { + cede_counter = 0; + + if (coroapi::nready ()) + coroapi::cede (); + } + } }; struct watcher_base