SwingWorker process(List V chunks) but List isn't thread safe is it.

Folks,
Am I missing something or does
protected void process(List<V> chunks)in the new 1.6 javax.swing.SwingWorker represent a potential threading issue?
List isn't thread safe... so why not use a Vector, which is? Except that Vector is currently considered persona-non-grata by bigger brains than me.
Hmmm... Of course, I don't know which implementation of List is being used under the hood, so I suppose I just have to trust the Java Gods who built the new SwingWorker to have used a thread safe implementation... which is pretty good bet, I suppose...
Can anyone state categorically that it isn't a problem?
Thanx. Keith.
Message was edited by: corlettk PS: I'm knee deep in thread gruel and going down fast.

publish definitely does not block until process is finished.
In fact calling publish does not necessarily mean that process will be called right away.
From the API:
Because the process method is invoked asynchronously on the Event Dispatch Thread multiple invocations to the publish method might occur before the process method is executed. For performance purposes all these invocations are coalesced into one invocation with concatenated arguments.
For example:
publish("1");
publish("2", "3");
publish("4", "5", "6");
might result in:
process("1", "2", "3", "4", "5", "6")
Edit:
The only source I could find for AccumulativeRunnable (the class used to accumulate the arguments passed to publish) was here:
http://fisheye5.cenqua.com/browse/swingworker/src/java/org/jdesktop/swingworker/AccumulativeRunnable.java?r=1.2
which isn't necessarily the implementation in the JDK but it's probably close.
That shows that before process is called the accumulating list reference is nulled, meaning that there is no way that publish can append to the list during a call to process.
In fact calling publish as the same time as process is executing on the EDT appends the published arguments to a fresh list, leading to another call to process at some later time (in SwingWorker the delay between a call to publish and a call to process is at most 1000/30 milliseconds).
Message was edited by:
dwg

Similar Messages

  • Swing isn't thread safe, what about AWT?

    Since Swing isn't really thread safe what does that mean for AWT? Is AWT thread safe? Also if it is doesn't that mean one should use AWT over Swing since AWT is thread safe?

    Trizi wrote:
    jverd wrote:
    Trizi wrote:
    [http://forum.java.sun.com/thread.jspa?threadID=5282846&tstart=0|http://forum.java.sun.com/thread.jspa?threadID=5282846&tstart=0]
    There ya go duffy the hom^oYou say that is if being gay were a bad thing. So, besides being an obnoxious fuckhead, you're also a homophobic troglodyte? Man your fiancee must be a real winner to have picked you. My guess is that she's either a sheep, a blow-up doll, or someone you've got bound and gagged in your basement.Now from what everyone is saying that I don't have anything original...
    You don't either, too much "Silence of the Lambs" maybe?Dude, try speaking English.
    By the way, I am sure if I was a troglodyte I would be in a museum, also I have homosexual friends, sorry not homophobic, I just found a good ting to his name and figured I'd exploit it.. Just like I'm exploiting your pathetic intelligence.You really need help if you think the above makes any sense or any point.

  • PACKNO inside ESKN is not listed in ESLH, but listed in LBLNI inside ESSR

    Dear All,
    I check PACKNO field of table ESKN with SE11 and find out that ESKN-PACKNO has a check table which is ESLH, also field PACKNO
    But !!!!
    I cannot find any PACKNO values inside table ESKN with PACKNO inside table ESLH.
    <b>It should that every PACKNO inside ESKN is registered inside ESLH table. Right ?</b>
    But, I found out that ESKN-PACKNO data is filled with LBLNI from ESSR. From this site.
    http://www.jt77.com/material/management-29211.html
    <b>This is not consistent between what I see in SE11 and what I browse with SE16</b>
    Unfortunately, that website is telling the truth. And how my R3 4.7 behaves.
    Yes, I download all ESKN-PACKNO to text files (around 10.000) and check with SE16-LBLNI and all number is match !
    I download all ESKN-PACKNO to text files (around 10.000) and check with SE16-ESLH <b>and none match !</b>
    Any explain ? Is this sap error ? should ESKN-PACKNO is a foreign key with ESLH-PACKNO but it can have values which is not contained in ESLH-PACKNO ?
    Instead, all ESKN-PACNO is ESSR-LBLNI ???????
    BW Ahmad

    Hi
    It's yes from MM point of view, which is ESSR-LBLINI --> ESKN-PACKNO
    but BIG NO for abapers or somebody who understand the meaning of check table.
    If you use t-code SE11 and type ESKN, you will see that ESKN-PACKNO check table is not ESSR-LBLNI.
    As I cannot upload pictures to this site, this site might help you understand what I try to say:
    http://bwas.sap.googlepages.com/essrandesknharmony
    Regards,
    BW Ahmad

  • I want to import photos onto my ipad3.  it shows up as a device in itunes but there isn't a photo category listed.  it shows music, movies, books and purchased.  am i doing something wrong.  thanks

    i want to import photos onto my ipad3.  it shows up as a device in itunes but there isn't a photo category listed.  it shows music, movies, books and purchased.
    how come photos doesn't appear?
    i went to itunes help and followed instruction from "add photos to ipod, iphone or ipad"
    i'm confused! please help
    thanks

    thank you.  that worked but i do have another question.  i was able to import photos as you instructed but i had to import the whole album.  how do i import only one or a few photos?
    thanks again

  • Just got the 5c and my music list are here but the music isn't. It says I have to download them! Buy doing this does it mean I have to pay for them again??

    Just got the 5c and my music list are here but the music isn't. It says I have to download them! Buy doing this does it mean I have to pay for them again??

    Check the link below for requirements and instructions for upgrading to Snow Leopard (10.6)
    http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard

  • EAS background processes status window is not listing the processes

    Hi All,
    When I choose to run a calc/report script at the background in EAS i dont see that process in the background process status window, it is just blank. but when i goto the session window to check, the process is still running. So background process status window is not list any processes that are chose to run at the background. Did anybody have this issue? Really appreciate your help to solve this problem.
    We are using Essbase 11.1.2.1. The issue is in the nonprod environment but it works fine in the prod environment which is running the same version.
    Thanks for you help..
    MD

    Hi Shiva,
    When I run a calc from EAS and If I choose to run at the background, I should see that process and all previous processes that were run at the background in "Background Process Status" window but i don't see anything there. What do I need to do in ESSVR?
    Hi Celvin,
    This is the JRE version and same in prod too.
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Oracle JRockit(R) (build R28.0.2-11-135406-1.6.0_20-20100624-2119-linux-x86_64, compiled mode)
    Thanks

  • The Control A key is not working. I cannot multi-select my songs. I'm not sure if it is the problem with iTunes 10.6.1.7 or my PC settings encounter issues. Also, i cannot find Album Artwork online using iTunes and i cannot select any view form but List.

    The Control A key is not working. I cannot multi-select my songs. I'm not sure if it is the problem with iTunes 10.6.1.7 or my PC settings encounter issues. Also, i cannot find Album Artwork online using iTunes and i cannot select any view form but List.

    The Control A key is not working. I cannot multi-select my songs. I'm not sure if it is the problem with iTunes 10.6.1.7 or my PC settings encounter issues. Also, i cannot find Album Artwork online using iTunes and i cannot select any view form but List.

  • I hit Forget Network and now cannot get back onto my wireless home network. All of my other computers and iphones are fine.  How do I get the network back?  It shows in my list of networks but when I use the password and try to join it says not connected.

    I hit Forget Network and now cannot get back onto my wireless home network. All of my other computers and iphones are fine.  How do I get the network back?  It shows in my list of networks but when I use the password and try to join it says not connected.

    See if the iPad will accept the password after you restart it. It's worth a try.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    You could also try a reset as well.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.

  • I am trying to download a free trial of photoshop for my macbook pro and it says there is an error and that the requirements for the new version is not supported for the mac I have. I have looked at the list of requirements but have no idea how to tell wh

    I am trying to download a free trial of photoshop for my macbook pro and it says there is an error and that the requirements for the new version is not supported for the mac I have. I have looked at the list of requirements but have no idea how to tell what I do and do not have?

    Apple Menu --> About this Mac.
    Mylenium

  • Hi, I am trying to install 4 Adobe apps onto a new iMac but Apps in Creative Cloud doesn't list any apps but says there is a download error and to contact customer support.

    Hi, I am trying to install 4 Adobe apps onto a new iMac but Apps in Creative Cloud doesn't list any apps but says there is a download error and to contact customer support.
    I can sign in fine with my username and password.
    Rick

    Hi daveforrestaid,
    Please refer to the threads below where this issue has been addressed:
    1. Creative Cloud "Download Error" message
    2. Creative Cloud - Download error - stubborn error
    Regards,
    Sheena

  • I have a problem with black squares in the contact list on facebook, but it is only in Firefox, I no longer know what to do? I'm using Windows 8

    I have a problem with black squares,rectangles, etc, in the contact list on facebook, but it is only in Firefox, I no longer know what to do? I'm using Windows 8.

    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • Latest ep of my podcast doesn't show in iTunes. Subscribers CAN download it. Podcast page shows 'Total: 3 items' but lists only items 2 and 3. RSS feed is validated and fine.

    Latest ep of my podcast doesn't show in iTunes store. Subscribers CAN download it. Podcast page shows 'Total: 3 items' but lists only items 2 and 3. RSS feed is validated and fine. How do I get iTunes to display it?

    I've used Feedburner many times and never had such a problem. I am a bit confused, forgive me if I ask for questions already answerd. Have you tried updating the podcast in someone elses copy of iTunes? My guess is that the file is bad since it is working in other programs but not iTunes. I would try making a new .mp4 file and podcasting it and seeing if that works.
    Good luck!
    ~Ben

  • I want to configure Firefox to only accept cookies from a specific list of websites, but my "Allow Exceptions" list is deleted when Firefox closes.

    I want to configure Firefox to only accept cookies from a specific list of websites, but my "Allow Exceptions" list is deleted when Firefox closes. (Firefox 5.0)

    @dmcritchie:
    ''How do you expect to keep cookies for certain sites, if you wipe out all of your cookies when the session ends or you clear the same history through the Tools menu''
    If you mean from session-to-session, I don't expect it to keep cookies. That's the whole point. Every time Firefox is opened, I want it to write a new cookie, and keep that cookie until it closes and no longer than that. (Perhaps I should clarify: I don't mean session in the networking sense but rather in the period of time when one starts using Firefox until Firefox closes.) The behavior I want is for it to be able to write cookies when open, but only for specific sites, and then forget about them on close.
    I should also mention that your responses are worthless to me because you don't explain anything. For instance, the quote above is ''not'' obvious from your reply of "Make sure you are not clearing cookies". You need to explain this; what is obvious in a reading for you is not obvious for everyone.
    Furthermore, how is "Site Preferences" related to "everything on the right-side"? (Not to mention that it's unclear what you mean by "right-side.")

  • In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    In the numbers app, using the "date and time" function, is it possible to remove the time? I need to put together a list of dates, but I don't need or want times.

    When formatting your column to date/time, pick Date & time, and then pick the letter i in the circle to the right. Then scroll down and pick "No time"
    Jason

  • I cannot find Acrobat 9 standard to download. I have the the serial number as listed at MyAdobe, but no link anywhere to the download.

    I cannot find Acrobat 9 standard to download. I have the the serial number as listed at MyAdobe, but no link anywhere to the download.

    David Franklin if the download was previously available under your account then please contact our support team directly at Contact Customer Care.  If still available then the software can be re-enabled for download.
    Once you have downloaded a copy of the installation files I would recommend making a back up in case you ever need the installation files in the future.
    Finally if you can please turn off your e-mail signature when responding in the forums.  These are public forums and both Ned and I have been editing your responses to remove your personal information.  If you would prefer to not turn off your e-mail signature then please respond directly in your web browser by clicking on the link to View the full discussion.

Maybe you are looking for

  • What's New 2.1.A.0.1 update

    A new update of What's New application has started to roll out (2.1.A.0.1). What's been changed? You can now watch Playstation trailers in the app. Discover new music since the app is now integrated with Spotify. Find your new favorite TV show in the

  • SSO All SAP solution with windows Active directory

    Dear Experts, We have multiple sap solution like SAP ERP EHP7 SAP BW SAPBO SAP EES/MMS SAP Solution Manager And all solutions based on Operating system AIX and database is DB2 We want to configure SSO ( using windows 2012 active directory users ) wit

  • Wget doesn't download files from premium rapidshare

    Hi, I have problem with my wget. I had Kubuntu(32bit) before Archlinux(64b) and this command: wget -c -i name_of_file --http-user=XXX --http-password=password it worked on Kubuntu, but now isn't work. I don't understand what is wrong. Now wget downlo

  • Base DN in ACS 4.2

    Hi, I have ACS 4.2. After specific period, authentication fails until we restarts the ACS. So i want to ckeck the value of Base DN. What is Base DN? and How to check its value? Regards Gaurav

  • Transport Release Error: Not all objects in the request could be locked.

    Hi all! I hope you can help me with this one. We need to transport a particular request in our QA and Production client. However, upon releasing of the transport request number, a warning/error message appeared on the screen: 'Not all objects in the