mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-09 03:59:53 -04:00
Raise the timer for the sync point error message to 20 seconds.
could fix #1708
This commit is contained in:
parent
77fb637fe3
commit
27865e313e
@ -617,7 +617,7 @@ pub const GarbageCollection = struct { // MARK: GarbageCollection
|
|||||||
_ = old.totalThreads - 1; // Assert no overflow
|
_ = old.totalThreads - 1; // Assert no overflow
|
||||||
if(old.cycle != threadCycle) removeThreadFromWaiting();
|
if(old.cycle != threadCycle) removeThreadFromWaiting();
|
||||||
const newTime = std.time.milliTimestamp();
|
const newTime = std.time.milliTimestamp();
|
||||||
if(newTime -% lastSyncPointTime > 10_000) {
|
if(newTime -% lastSyncPointTime > 20_000) {
|
||||||
std.log.err("No sync point executed in {} ms for thread. Did you forget to add a sync point in the thread's main loop?", .{newTime -% lastSyncPointTime});
|
std.log.err("No sync point executed in {} ms for thread. Did you forget to add a sync point in the thread's main loop?", .{newTime -% lastSyncPointTime});
|
||||||
std.debug.dumpCurrentStackTrace(null);
|
std.debug.dumpCurrentStackTrace(null);
|
||||||
}
|
}
|
||||||
@ -652,7 +652,7 @@ pub const GarbageCollection = struct { // MARK: GarbageCollection
|
|||||||
/// Must be called when no objects originating from other threads are held on the current function stack
|
/// Must be called when no objects originating from other threads are held on the current function stack
|
||||||
pub fn syncPoint() void {
|
pub fn syncPoint() void {
|
||||||
const newTime = std.time.milliTimestamp();
|
const newTime = std.time.milliTimestamp();
|
||||||
if(newTime -% lastSyncPointTime > 10_000) {
|
if(newTime -% lastSyncPointTime > 20_000) {
|
||||||
std.log.err("No sync point executed in {} ms. Did you forget to add a sync point in the thread's main loop", .{newTime -% lastSyncPointTime});
|
std.log.err("No sync point executed in {} ms. Did you forget to add a sync point in the thread's main loop", .{newTime -% lastSyncPointTime});
|
||||||
std.debug.dumpCurrentStackTrace(null);
|
std.debug.dumpCurrentStackTrace(null);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user