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

Comparing deliantra/server/common/map.C (file contents):
Revision 1.95 by root, Thu Mar 15 13:19:37 2007 UTC vs.
Revision 1.97 by root, Sat Mar 17 21:13:21 2007 UTC

454} 454}
455 455
456bool 456bool
457maptile::_save_objects (object_freezer &f, int flags) 457maptile::_save_objects (object_freezer &f, int flags)
458{ 458{
459 static int cede_count = 0; 459 coroapi::cede ();
460 460
461 if (flags & IO_HEADER) 461 if (flags & IO_HEADER)
462 _save_header (f); 462 _save_header (f);
463 463
464 if (!spaces) 464 if (!spaces)
465 return false; 465 return false;
466 466
467 for (int i = 0; i < size (); ++i) 467 for (int i = 0; i < size (); ++i)
468 { 468 {
469#if 0 // temporarily disabled for improved(?) stability, schmorp #TODO#d#//D 469#if 0 // disabled, there still seem to be races somewhere
470 static int cede_count = 0;
471
470 if (cede_count >= 500) 472 if (cede_count >= 500)
471 { 473 {
472 cede_count = 0; 474 cede_count = 0;
473 coroapi::cede (); 475 coroapi::cede ();
474 } 476 }
493 } 495 }
494 else if (flags & IO_OBJECTS) 496 else if (flags & IO_OBJECTS)
495 op->write (f); 497 op->write (f);
496 } 498 }
497 } 499 }
500
501 coroapi::cede ();
498 502
499 return true; 503 return true;
500} 504}
501 505
502bool 506bool

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines