public void run() {
        log.tracef("Begin run");

        while (!released) {
            try {
                MailActivation ma = pollQueue.take();

                // Wait until its time to check for new msgs
                long now = System.currentTimeMillis();
                long nextTime = ma.getNextNewMsgCheckTime();
                long sleepMS = nextTime - now;

                if (sleepMS > 0) { Thread.sleep(sleepMS); }

                if (released) { break; }

                // This has to go after the sleep otherwise we can get into an inconsistent state
                if (ma.isReleased()) { continue; }

                // Now schedule excecution of the new msg check
                mgr.scheduleWork(ma, WorkManager.INDEFINITE, null, this);
            } catch (InterruptedException e) {
                log.debug("Interrupted waiting for new msg check. NewMsgsWorker will stop checking for new messages.");
                Thread.currentThread().interrupt();
            } catch (WorkException e) {
                log.warn("Failed to schedule new msg check", e);
            }
        }

        log.tracef("End run");
    }