Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Java
  4. A Collection is not thread-safe?

A Collection is not thread-safe?

Scheduled Pinned Locked Moved Java
question
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Neo10101
    wrote on last edited by
    #1

    Hello What is meant by the following text? Q. "public synchronized List (only 1 thread can access it at the same time)" What does that mean? Does that mean Lists get auto-locked? Regards, CSTreval

    L 1 Reply Last reply
    0
    • N Neo10101

      Hello What is meant by the following text? Q. "public synchronized List (only 1 thread can access it at the same time)" What does that mean? Does that mean Lists get auto-locked? Regards, CSTreval

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The list is synchronized across all threads as described here[^].

      Just say 'NO' to evaluated arguments for diadic functions! Ash

      B 1 Reply Last reply
      0
      • L Lost User

        The list is synchronized across all threads as described here[^].

        Just say 'NO' to evaluated arguments for diadic functions! Ash

        B Offline
        B Offline
        Branislav Vidovic
        wrote on last edited by
        #3

        Is this a part of method declaration or what ?

        L 1 Reply Last reply
        0
        • B Branislav Vidovic

          Is this a part of method declaration or what ?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          No it's the constructor as described in the link I gave you. As it says in the description "Returns a synchronized (thread-safe) list".

          Just say 'NO' to evaluated arguments for diadic functions! Ash

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups