Code Monkey home page Code Monkey logo

Comments (7)

gresrun avatar gresrun commented on August 25, 2024

Sounds correct to me. Would you mind putting a pull request together?

from jesque.

gresrun avatar gresrun commented on August 25, 2024

Michael, I looked over the issue and I believe the simplest answer is not to even call recoverFromException() in the case of an interrupt for shutdown. Can you review the commit above to see if you agree?

The branch is issue-20.

from jesque.

michaelcameron avatar michaelcameron commented on August 25, 2024

There might be some value to still handle the exception in the case of
an unexpected interruption when it is not in the shutdown state. I
would expect to get a log statement in that case.

On May 11, 2012, at 7:23 PM, Greg Haines
[email protected]
wrote:

Michael, I looked over the issue and I believe the simplest answer is not to even call recoverFromException() in the case of an interrupt for shutdown. Can you review the commit above to see if you agree?

The branch is issue-20.


Reply to this email directly or view it on GitHub:
#20 (comment)

from jesque.

gresrun avatar gresrun commented on August 25, 2024

The logic in the commit will only discard InterruptedExceptions while in the SHUTDOWN state:

catch (InterruptedException ie)
{
    if (!isShutdown())
    {
        recoverFromException(curQueue, ie);
    }
}

Which covers the case you mentioned, if I understood you correctly.

from jesque.

michaelcameron avatar michaelcameron commented on August 25, 2024

Sorry, I have limited connectivity through Monday, but I did just jump on my laptop. I missed the commit earlier when I replied on my phone. I think it looks good, it would address both the situation of an expected InterruptedException when calling worker.end(true) and handling and unexpected InterrtuptedException in other cases. Thanks.

from jesque.

gresrun avatar gresrun commented on August 25, 2024

Merged into master.

from jesque.

gresrun avatar gresrun commented on August 25, 2024

This fix is in v1.2.0, which I just cut this evening.

from jesque.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.