… | |
… | |
1339 | |
1339 | |
1340 | $map->load_header |
1340 | $map->load_header |
1341 | or return; |
1341 | or return; |
1342 | |
1342 | |
1343 | if ($map->should_reset) { |
1343 | if ($map->should_reset) { |
|
|
1344 | # doing this can freeze the server in a sync job, obviously |
1344 | $cf::WAIT_FOR_TICK->wait; |
1345 | #$cf::WAIT_FOR_TICK->wait; |
1345 | $map->reset; |
1346 | $map->reset; |
1346 | undef $guard; |
1347 | undef $guard; |
1347 | $map = find $path |
1348 | $map = find $path |
1348 | or return; |
1349 | or return; |
1349 | } |
1350 | } |
… | |
… | |
1456 | |
1457 | |
1457 | undef $MAP_PREFETCH{$path}; |
1458 | undef $MAP_PREFETCH{$path}; |
1458 | $MAP_PREFETCHER ||= cf::async { |
1459 | $MAP_PREFETCHER ||= cf::async { |
1459 | while (%MAP_PREFETCH) { |
1460 | while (%MAP_PREFETCH) { |
1460 | for my $path (keys %MAP_PREFETCH) { |
1461 | for my $path (keys %MAP_PREFETCH) { |
1461 | warn "prefetching $path...\n";#d# |
|
|
1462 | my $map = find $path |
1462 | my $map = find $path |
1463 | or next; |
1463 | or next; |
1464 | $map->load; |
1464 | $map->load; |
1465 | |
1465 | |
1466 | delete $MAP_PREFETCH{$path}; |
1466 | delete $MAP_PREFETCH{$path}; |