dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: Making thread safe singletons

  1. #1
    Join Date
    Mar 2004
    Posts
    32

    Making thread safe singletons

    What are my options for making a singleton thread safe?

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Synchronize it.

  3. #3
    Join Date
    Mar 2004
    Posts
    32
    Is this easy to do?

  4. #4
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,136
    yes, just use synchronize keyword....
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  5. #5
    Join Date
    Mar 2004
    Posts
    32
    Does this synchronization take place in the definition of the singleton class itself or in the class that instantiats it?

  6. #6
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    In methods in the singleton.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles