… | |
… | |
356 | Coro::cede or Event::one_event; |
356 | Coro::cede or Event::one_event; |
357 | } |
357 | } |
358 | |
358 | |
359 | $time = Event::time - $time; |
359 | $time = Event::time - $time; |
360 | |
360 | |
361 | LOG llevError | logBacktrace, "long sync job\n" |
361 | LOG llevError | logBacktrace, Carp::longmess "long sync job" |
362 | if $time > $TICK * 0.5; |
362 | if $time > $TICK * 0.5 && $TICK_WATCHER->is_active; |
363 | |
363 | |
364 | $tick_start += $time; # do not account sync jobs to server load |
364 | $tick_start += $time; # do not account sync jobs to server load |
365 | |
365 | |
366 | wantarray ? @res : $res[0] |
366 | wantarray ? @res : $res[0] |
367 | } else { |
367 | } else { |