ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/loader.C
(Generate patch)

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.34 by root, Sun Dec 31 18:10:40 2006 UTC vs.
Revision 1.36 by root, Mon Jan 1 21:19:51 2007 UTC

1057 * 1057 *
1058 */ 1058 */
1059int 1059int
1060load_object (object_thawer &fp, object *op, int map_flags) 1060load_object (object_thawer &fp, object *op, int map_flags)
1061{ 1061{
1062 // cede every 500 objects loaded 1062 coroapi::cede_every (1000); // cede once in a while
1063 {
1064 static int cede_counter = 0;
1065
1066 if (++cede_counter >= 500)
1067 {
1068 cede_counter = 0;
1069 if (coroapi::nready ())
1070 coroapi::cede ();
1071 }
1072 }
1073 1063
1074 return parse_object (op, fp, map_flags); 1064 return parse_object (op, fp, map_flags);
1075} 1065}
1076 1066
1077/* This takes a buffer, scans it for variables, and sets those variables 1067/* This takes a buffer, scans it for variables, and sets those variables

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines