Out of order when put /take packages in/from a blocking queue

Hello all:
I put multiple packages in a blocking queue in one thread, and take them out from another thread. The in sequence is 1-2-3, the out sequence becomes 3-2-1. This is NOT a FILO pattern, there is no pattern: it could be 3-1-2, etc.
The question is: can out-of-order issue even take place when put()/take() operations impose on a blocking queue? If it's not possible, which I believe, I'll look elsewhere for the cause. Otherwise, why and how to fix it.
Thanks,
John

Please provide an [url http://sscce.org]SSCCE that demonstrates this.
Unless you're using a PriorityQueue or some other specialized implementation, it should be a FIFO order. Check the docs for the implementation you're using.
Edited by: jverd on Nov 22, 2011 4:41 PM

Similar Messages

  • Smart Playlist is out of order when put on iPod

    Hi, I'd like help getting my smart playlist in order. The criteria for the playlist is to be above 3 star rating, but I can't seem to tell what order the playlist is in; sometimes it seems like it's artist name, but then it sort of randomly changes. It looks normal in iTunes but when I'm using the iPod by itself the order is messed up. I don't use the sync function and don't want to. There was a way to get it in order on my old iPod, but I can't seem to remember how becuase it was stolen and I didn't have one for a while... thanks for the help.

    I know it can be done, someone please help...

  • When i take a picture from left its turning to the right and the other way. Howcan i stop that?

    When i take a picture from left its turning to the right and the other way. Howcan i stop that?

    Hi Cecilie1,
    I apologize, I'm a bit unclear on the exact nature of the issue you are describing. If you are having issues with photo rotation, you may want to make sure that your iPhone is detecting the orientation when you take the photos. In iOS 7 and iOS 8, the top menu text when taking a photo should rotate to show orientation (the bottom menu stays oriented to the shutter button). You can see these menus on the following page:
    Camera at a glance - iPhone
    If your iPhone isn't sensing rotation for pictures, you may want to check to see if the Rotation Lock is engaged, as noted here:
    If the screen doesn't rotate on your iPhone, iPad, or iPod touch - Apple Support
    Regards,
    - Brenden

  • Photos randomly out of order when published to my gallery!

    Photos are in the right order in iPhoto on my mac (Library, Albums, Web), but when the album is published to my gallery the photos are completely and randomly out of order.
    The name of each photo is just the number given by the camera, and iPhoto had correctly imported the folder of photos in chronological order from a hard disk.
    Also, there are videos which sometimes work in the gallery, but for some it says quicktime cannot play the video, and sometimes the video is UPSIDE DOWN!
    How can I get the correct order (and functioning videos)?
    Thanks

    In the gallery on the web, I see no pattern to the random order.
    Aha! In iPhoto (back on my mac), I now see that the order from the import at the beginning ("events") is not the same as the original folder (where all files were in order of file number). I see the problem there - iPhoto imports the photos in the correct order until it encounters a video. The videos (.mov) are mostly in the wrong place, although I found one in the right place (just to make it impossible to say always, grr).
    Then when the mostly in order (apart from videos out of order) "album" is published to the web gallery, photos and videos are completely out of order.
    I had never tried including videos in photo albums in iPhoto, I think because in previous versions this was impossible. So I had published one video at a time to its own "album" on the gallery. Maybe iPhoto is mixed up by these videos in with photos. Strange though, because it gives details about how many photos and how many videos in the album, and seems to act like this would be possible.
    So, resetting the order in iPhoto does not allow me to republish maintaining this order. In the publishing process, somehow all are randomly mixed up. The only way I can see to reorder everything in the gallery is to move them all manually there in the gallery when connected to my account at me.com
    I had hoped to find a better solution, because this would take a long time to do.
    Message was edited by: chasmania

  • Clips are out of order when drug to Timeline

    I was working with final cut pro, showing a friend how to use it and ran into a problem that has never happened when I've used it on my machine. We did log and capture, and captured the video. then I went Mark-> DV Start/Stop Detect. From there I selected the first segment and the last segment and drug them to the timeline. once in the time line they were all out of order. Usually they are placed in the time line 1 through 80 or however many there are, one after another. There is nothing else in the time line. When I drug them this time they would be arranged in all different orders. Anyone have any idea whats going on with this?
    Thanks in advance.
    TY

    It goes by the Track # field, as seen in on a list in iTunes.  So, make sure the Track # field is correctly entered for each song when you review the album on a list in iTunes.  Also, make sure the Album field is entered identically for all the songs on the album.
    You can edit those fields by doing a Get Info on a song, and going to the Info windows's Info tab,

  • Task Line Numbers Move Out of Order When Adding Resource to a Task

    I am using MS Project 2013 and we are in the process of setting up Project Server 2013. 
    When I add a resource to a task and close the summary task and re-open the task is moved to the bottom of that section and the line numbers are out of order.
    For example line number 382 is the third task under the summary task.  When I add a resource, hide the subtasks and then expand the subtasks line number 382 is now at the bottom after line 389.  The line numbers then go 381, 383, 384... until 389
    then 382 is after 389.
    I want to keep the tasks in sequential order.
    Has anyone seen this problem before?  I have done extensive research online and cannot seem to find any one with a similar issue.
    Thank you! :)

    Hi Dnbree,
    Do you have any filters applied to the view in Project Pro? Try to change view and check if you experience the same issue.
    Also check if the view uses a sorting in the view tab of the ribbon, such as sort by resources.
    Hope this helps.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Option key is out of order when I want to select a boot disk

    I've upgraded the OsX10.6.8.
    after then, I can't boot by Bootcamp any more, because the Option key is out of order. I've tried it over 10 times. What's wrong?

    Reinstall OS X without erasing the drive
    Do the following:
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.

  • I can't set up iCloud because I left out a letter when putting in my email address.  How do I fix this problem?

    I have an iPad, version 8.1, 12.2 storage capacity.  I tried to set up iCloud but left out a letter when giving my email address.  Now I can't complete the set up.  How do I fix this problem?

    Do you want to change to your name for just the email and/or your MBP?  As it stands now, your sister is the admin not you.
    If you just want to change the email and you are using Apple's Mail, post in the Mac OS X v10.6 Snow Leopard/Mail forum.  If using 3rd party email client, post in their forum. 

  • HT1351 Some albums tracks are in the correct order in Itunes on my laptop but are out of order when input to ipod. How do I correct this please?

    Some of my albums are not in the correct order when transferred from itunes on my laptop to my ipod classic. Can anyone suggest how I can correct this please

    It goes by the Track # field, as seen in on a list in iTunes.  So, make sure the Track # field is correctly entered for each song when you review the album on a list in iTunes.  Also, make sure the Album field is entered identically for all the songs on the album.
    You can edit those fields by doing a Get Info on a song, and going to the Info windows's Info tab,

  • Itunes keeps shuffling the songs out of order when i burn a CD

    I have no idea why this is happening. The shuffle is turned off. I just installed the new version with the same results. Thanks in advance for any help.

    It is a weird bug that shows up unpredictably.
    The following workaround sometimes help: start a new playlist and add the same songs to it. Make sure the little triangle is above the number column, and get the songs into the right order. Then do the burn from the new playlist.

  • When is a package released from memory?

    When I call a package for the first time, the whole package is loaded into memory and later calls to related procedures in the package require no disk I/O. But what does "for the first time" mean? I mean, when will the package loaded into memory be released? When the DB get shoutdowned or what else?
    Thanks!

    Hi,
    Refer Oracle Package Pinning and
    Oracle Packages
    *009*

  • When i take a picture from my iPhone 4, why doesn't appear on my PC    PC

    When I take a picture with my IPhone 4, why aren't the ictures showing up on my PC? This is after getting ICloud.

    Make sure you have the iCloud control panel installed and configured on the windows computer and on your iPhone.

  • Printing the Package output from Anonymous block

    Hi,
    I need to call the below package from anonymous block and get the output.
    Could you let me know.
    I tried using this, but i don't get data.
    ===========Anonymous Block=====================================================================
    declare
    var              xxdc.xxdc_sr_log_his_pkg.sr_tbl_type;
    l_sr_idx_bi  BINARY_INTEGER := 0;
    BEGIN
    xxdc.xxdc_sr_log_his_pkg.service_record('14040',var);
    dbms_output.put_line('CLAIM_CREDIT_OFFERS  :'||var(l_sr_idx_bi).qa_credit_offers(l_sr_idx_bi).character1 );
    end;
    =============================================================================================
    ============================================================================================
    Package Spec
    TYPE cr_offer_type IS TABLE OF apps.qa_results_v%ROWTYPE  
    INDEX BY BINARY_INTEGER;
    TYPE sr_rec_type IS RECORD
    (task_status                      apps.jtf_task_statuses_tl.name%TYPE
    ,task_type                        apps.jtf_task_types_tl.name%TYPE
    ,qa_credit_offers                 cr_offer_type
    TYPE sr_tbl_type IS TABLE OF sr_rec_type
    INDEX BY BINARY_INTEGER;
    PROCEDURE  service_record(p_service_req_num IN  VARCHAR2
                                               ,p_service_req_tbl OUT sr_tbl_type
    Package Body
           FOR emp_row_rec IN cur_credit_off
           LOOP
             l_sr_tbl(l_sr_idx_bi).qa_credit_offers(l_sr_idx_bi).character1 := emp_row_rec.character1;
             --dbms_output.put_line( l_sr_tbl(l_sr_idx_bi).qa_credit_offers(l_sr_idx_bi).character1);   --commenting for testing
              l_sr_idx_bi := l_sr_idx_bi + 1;
           END LOOP;
          p_service_req_tbl := l_sr_tbl;
    =============================================================================================
    Thank

    Hi,
    Did you issue the SQL*Plus command
    SET  SERVEROUTPUT  ON
    or, if you're using some other front end, its equivalent?
    Can you ever see output from dbms_output?  For example, what happens when you run this?
    SET  SERVEROUTPUT  ON
    BEGIN
        dbms_output.put_line ('Hello, world!');
    END;
    Since I don't have your tables, I can't actually run your code.  If you'd post CREATE TABLE and INSERT statements, or re-write the package to reference commonly available tables, such as those in the scott schema, then I could test it.

  • Pages out of order when booklet printing on both sides

    When booklet printing on the HP Laserjet Pro 200 color m251nw using manual duplexing the pages come out in the wrong order. If I create a document that has 4 pages only  it prints pages 4 and 1 on the first side and 2 and 3 on the second as it is supposed to. If i add four more pages it no longer works properly - in that case it prints pages 8 and 1 on one side then 4 and 5 on the second side of that sheet and then 6 and 3 on the first side of the second sheet and pages 2 and 7 on the second side of the second sheet so when it is folded in half the page sequence becomes 1,4, 3, 2, 7, 6, 5, 8.  I routinely do this on another hp printer and a xerox printer with no issue. What settings should i be using on this model?

    Hi , I see that you are having issues manually duplexing. I would be happy to help you. Here is the two-sided printing instructions provided from the manual on page 27. LASERJET PRO 200 COLOR.You may have to uninstall and reinstall the printer software, it might have gotten corrupted. I would suggest to download a Universal Print Driver to see if that will help resolve this issue.HP Universal Print Driver for Windows PCL6 (32-bit). If there is anything else I can help you with, just let me know. Have a nice day!
    Thank You.

  • Tracks out of order when playing album through Remote Web Access

    When you choose an album (CD if you want) in Remote Web Access and play it, the tracks don't play in the original order.  You can drag and drop to reorder them, but you have to know the right order.  Is there a way to fix this or is this just a
    failing of the Remote Web Access software?  Thanks in advance.

    I'm having the same issue. Ever find a solution for this?

Maybe you are looking for

  • HR Tables

    Hi,      What is the table for Country indicator and ISO codes? bye phanikumar

  • New Sql() in J2SE 1.5.0

    i was using the version 1.4.2 of J2SE... i'm now upgrading version to 1.5.0...and as expected... some stuff stoped working... i am doing this: import java.util.*; import java.sql.*; Sql sql = new Sql();and now it doesn't recognize the Sql class...it

  • Need CSS help Coda-Slider 2

    I'm having trouble setting the width of the <ul> in this Coda-Slider tab set up. I'd like all the tabs across the top to display in one line rather that wrap to two. http://www.cidigitalmedia.com/coda-slider-2.0/index.html You'll see the last tab wra

  • Really wired problem in Bridge,help!!!

    when in Bridge cs5,i want to select an image thumbnail,but i only click once,the image will open in Ps...i used to click twice to get the same result.so,how to solve it ,thank u!

  • Why does Mozilla Firefox continue to crash?

    I have an AT&T Avail (android). I can open it for a few minutes, then it crashes. HELP!!