Changeset 1368548
- Timestamp:
- May 4, 2016 11:43:47 AM (5 years ago)
- Branches:
- master
- Children:
- cdafab27
- Parents:
- cb2790b
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
core/java/src/net/i2p/util/SimpleTimer2.java
rcb2790b r1368548 254 254 255 255 /** state of the current event. All access should be under lock. */ 256 pr ivateTimedEventState _state;256 protected TimedEventState _state; 257 257 /** absolute time this event should run next time. LOCKING: this */ 258 258 private long _nextRun; … … 339 339 public synchronized void reschedule(long timeoutMs, boolean useEarliestTime) { 340 340 if (timeoutMs <= 0) { 341 if (timeoutMs < 0 && _log.should Warn())342 _log. warn("Resched. timeout < 0: " + this + " timeout = " + timeoutMs + " state: " + _state);341 if (timeoutMs < 0 && _log.shouldInfo()) 342 _log.info("Resched. timeout < 0: " + this + " timeout = " + timeoutMs + " state: " + _state); 343 343 timeoutMs = 1; 344 344 } … … 424 424 synchronized(this) { 425 425 if (Thread.currentThread().isInterrupted()) { 426 _log.warn("I was interrupted in run, state "+_state+" event "+this); 426 if (_log.shouldWarn()) 427 _log.warn("I was interrupted in run, state "+_state+" event "+this); 427 428 return; 428 429 } … … 432 433 switch(_state) { 433 434 case CANCELLED: 435 if (_log.shouldInfo()) 436 _log.info("Not actually running: CANCELLED " + this); 434 437 return; // goodbye 435 438 case IDLE: // fall through … … 445 448 // proceed, switch to IDLE to reschedule 446 449 _state = TimedEventState.IDLE; 450 if (_log.shouldInfo()) 451 _log.info("Early execution, Rescheduling for " + difference + " later: " + this); 447 452 schedule(difference); 448 453 return; … … 486 491 if (_rescheduleAfterRun) { 487 492 _rescheduleAfterRun = false; 493 if (_log.shouldInfo()) 494 _log.info("Reschedule after run: " + this); 488 495 schedule(_nextRun - System.currentTimeMillis()); 489 496 } … … 495 502 if (time > 500 && _log.shouldLog(Log.WARN)) 496 503 _log.warn(_pool + " event execution took " + time + ": " + this); 504 else if (_log.shouldDebug()) 505 _log.debug("Execution finished in " + time + ": " + this); 497 506 if (_log.shouldLog(Log.INFO)) { 498 507 // this call is slow - iterates through a HashMap - … … 538 547 */ 539 548 private static abstract class PeriodicTimedEvent extends TimedEvent { 540 private long _timeoutMs;549 private final long _timeoutMs; 541 550 542 551 /** … … 557 566 public void run() { 558 567 super.run(); 559 schedule(_timeoutMs); 568 synchronized(this) { 569 // Task may have rescheduled itself without actually running. 570 // If we schedule again, it will be stuck in a scheduling loop. 571 // This happens after a backwards clock shift. 572 if (_state == TimedEventState.IDLE) 573 schedule(_timeoutMs); 574 } 560 575 } 561 576 } -
history.txt
rcb2790b r1368548 1 2016-05-04 zzz 2 * Utils: Fix bug in periodic timers triggered by 3 a backwards clock shift, caused graphs to be blank 4 and various router, streaming, and i2ptunnel 5 degradations over time (ticket #1776) 6 7 2016-05-01 zzz 8 * Build: Compile resource bundles from ant, not msgfmt, 9 speeding up builds with translations by 20x 10 * Debian: Back out libhttpclient-java dependency, 11 requires 4.4 which is too recent for most distros 12 13 2016-04-30 zzz 14 * Blocklist: Add RFC 6598 addresses 15 * Console: 16 - Only display cpuid information on x86 17 - Readme page link fixes (tickets #1789, #1790) 18 * Data: Fix NPE calculating the hash of a RI of unknown sig type 19 * Debian: 20 - Add runtime dependency on libhttpclient-java, 21 link to /usr/share/java/httpclient.jar and httpcore.jar 22 * Eepsite: comment out gzip filtering in cgi context, 23 causes hung threads, root cause unknown 24 * Router: Reduce log level of RI sig failure 25 * SAM: Log tweaks (ticket #1778) 26 1 27 2016-04-29 zzz 2 28 * Debian: -
router/java/src/net/i2p/router/RouterVersion.java
rcb2790b r1368548 19 19 public final static String ID = "Monotone"; 20 20 public final static String VERSION = CoreVersion.VERSION; 21 public final static long BUILD = 8;21 public final static long BUILD = 9; 22 22 23 23 /** for example "-test" */
Note: See TracChangeset
for help on using the changeset viewer.