Code Monkey home page Code Monkey logo

Comments (4)

ssbarnea avatar ssbarnea commented on June 1, 2024

I didn't use the Singleton in a long time but if you make a pull request I will be more than happy to review it and to include it.

from tendo.

NadavK avatar NadavK commented on June 1, 2024

By just reviewing the code (not actual testing), Singleton's logic is not based on file existence, rather on the file being locked.
I assume the __del__ is just for completeness, and not actually required

from tendo.

ssbarnea avatar ssbarnea commented on June 1, 2024

Yes, that is because a running script can be terminated at any time, failing to remove the file. Due to this, the only way to assure some kind of locking mechanism was to check if the file is locked or not.

/sorin

On 27 Feb 2015, at 00:06, NadavK [email protected] wrote:

By just reviewing the code (not actual testing), Singleton's logic is not based on file EXISTENCE, rather on the file being LOCKED.
I assume the del is just for completeness, and not actually required


Reply to this email directly or view it on GitHub.

from tendo.

bristea avatar bristea commented on June 1, 2024

foo

from tendo.

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.