Changeset a7f8560


Ignore:
Timestamp:
Sep 16, 2011 2:47:40 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
dc04414e
Parents:
217cb1f
Message:
  • JobQueue?:
    • Add warning to setStartAfter() as queue is no longer continuously sorted
    • Fix StartExplorerJob? not calling requeue()
    • More pumper cleanups
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r217cb1f ra7f8560  
     12011-09-16 zzz
     2  * Console: Home page flag spacing
     3  * EepGet: Add some new command line options
     4  * JobQueue:
     5    - Add warning to setStartAfter() as queue is no longer
     6      continuously sorted
     7    - Fix StartExplorerJob not calling requeue()
     8    - More pumper cleanups
     9  * Reseed:
     10    - Add HTTP proxy authorization support
     11    - Stub out SSL proxy support
     12    - Disable i2pbote reseed
     13  * Router: Fix router changing client-side tunnel options,
     14    causing original tunnel quantity to not be restored
     15    (ticket #513)
     16
    1172011-09-14 zzz
    218  * Console: Verify valid host/IP before saving on net config form
  • router/java/src/net/i2p/router/JobQueue.java

    r217cb1f ra7f8560  
    460460                    long now = _context.clock().now();
    461461                    long timeToWait = -1;
    462                     List<Job> toAdd = null;
    463462                    try {
    464463                        synchronized (_jobLock) {
     
    471470                                        ((JobImpl)j).madeReady();
    472471
    473                                     if (toAdd == null) toAdd = new ArrayList(4);
    474                                     toAdd.add(j);
     472                                    _readyJobs.offer(j);
    475473                                    iter.remove();
    476474                                } else {
     
    487485                                }
    488486                            }
    489 
    490                             if (toAdd != null) {
    491                                 if (_log.shouldLog(Log.DEBUG))
    492                                     _log.debug("Not waiting - we have " + toAdd.size() + " newly ready jobs");
    493                                 // rather than addAll, which allocs a byte array rv before adding,
    494                                 // we iterate, since toAdd is usually going to only be 1 or 2 entries
    495                                 // and since readyJobs will often have the space, we can avoid the
    496                                 // extra alloc.  (no, i'm not just being insane - i'm updating this based
    497                                 // on some profiling data ;)
    498                                 for (int i = 0; i < toAdd.size(); i++)
    499                                     _readyJobs.offer(toAdd.get(i));
    500                                 _jobLock.notifyAll();
    501                             } else {
    502487                                if (timeToWait < 0)
    503                                     timeToWait = 30*1000;
     488                                    timeToWait = 1000;
    504489                                else if (timeToWait < 10)
    505490                                    timeToWait = 10;
     
    509494                                //    _log.debug("Waiting " + timeToWait + " before rechecking the timed queue");
    510495                                _jobLock.wait(timeToWait);
    511                             }
    512496                        } // synchronize (_jobLock)
    513497                    } catch (InterruptedException ie) {}
     
    632616         public int compare(Job l, Job r) {
    633617             // equals first, Jobs generally don't override so this should be fast
     618             // And this MUST be first so we can remove a job even if its timing has changed.
    634619             if (l.equals(r))
    635620                 return 0;
  • router/java/src/net/i2p/router/JobTiming.java

    r217cb1f ra7f8560  
    3232     */
    3333    public long getStartAfter() { return _start; }
     34
     35    /**
     36     * WARNING - this does not force a resort of the job queue any more...
     37     * ALWAYS call JobImpl.requeue() instead if job is already queued.
     38     */
    3439    public void setStartAfter(long startTime) {
    3540        _start = startTime;
  • router/java/src/net/i2p/router/RouterVersion.java

    r217cb1f ra7f8560  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 18;
     21    public final static long BUILD = 19;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/networkdb/kademlia/StartExplorersJob.java

    r217cb1f ra7f8560  
    8181        if (_log.shouldLog(Log.DEBUG))
    8282            _log.debug("Updating exploration schedule with a delay of " + delay);
    83         getTiming().setStartAfter(getContext().clock().now() + delay);       
     83        requeue(delay);       
    8484    }
    8585   
Note: See TracChangeset for help on using the changeset viewer.