Make all other works stop until a thread finishes execution

Hi,
I have the following thread.
_thread = new Thread()
               public void run()
                    try
                         //Something is executing here
                    catch (Exception e)
                              System.out.println(e);
          _thread.start();Once the control gets inside this thread, all other works should be posed and the other works should be resumed only once this thread finishes execution.
how can i do that?
Please help.
Any help in this regard will be appreciated with dukes.
Regards,
Rony

RonyFederer wrote:
Once the control gets inside this thread, all other works should be posed and the other works should be resumed only once this thread finishes execution.You can do that at the method or block level by synchronizing on the same object in all threads. Normally you would only do that for controlling access a specific object or resource, so only one thread can access the object or resource at a time.
The basic threading operations are suited to such uses, rather than managing the order a sequence of processes.
You could also use join, but that requires that all the threads threads you want to pause have a reference to the thread you're creating, and need a mechanism to change their behaviour when the thread is started, rather than having to the object used for synchronisation passed to them when they are started. However, with synchronization you can't guarantee which thread gets the lock on the object in which order, so you may want to do it using join.
The more important question is why you want the other threads to pause.

Similar Messages

  • This isn't achely a question it's about iPod  not iPhone but can Apple. Make all apps work with iOS 7 even when it's really old

    This isn't achely a question it's about iPod  not iPhone but can Apple. Make all apps work with iOS 7 even when it's really old

    And it's totally impractical for any OS to provide complete backwards compatibility in perpetuity. So no, Apple cannot grant your request. As WJ said, it's the developers' reponsibility to provide updates to their applications to be compatible with newer operating system releases, whatever the platform might be.
    Regards.

  • Volumne control via the earphones is not working, all other functions stop,start, next/orevíous title work fine

    Hello,
    the volumne control of my apple earphones is not working.
    All other functions available at the switch on the earphones work fine (Stop, Start, next/previous title, accept incoming call)
    I have already several times rebooted the iPhone 5S.
    I'm gratefull for every hint

    Hello Any one? Apple?
    Ah forget it... it been two weeks and nothing.
    The product wasn't even designed to last for 2 years, and mine is trash after less than one.
    I will NEVER buy another song from the itunes store or another iPod. or even another Mac product for that matter.
    Message was edited by: Chompers417

  • Itunes refuses to recognise my ipad telling me that i need to uninstall itunes and reinstall the itunes 64bit version for windows - i am on windows 7 and all was working fine until suddenly for no reason at all itunes had some apple support error

    I have windows 7 and all has been fine until 2 days ago when suddenly i turned on my laptop and i got some error message about some apple support program error - i didnt tkae notice of it only that i couldnt run itunes, so i uninstalled and reinstalled itunes and it now runs as normal, but now it wont recognise my ipad saying that 64bit version is not installed - WHAT RUBBISH IS THIS? i downloaded and installed the 64bit version from applie and yet the error persists - can some one please tell me how i can get itunes to recognise my ipad again - this seems like such a ridiculous error for these two apple products to be conflicting with each other - please help

    well i have found that i needed to not just uninstall itunes, but also apple mobile device support, bonjour apple software update and apple application support - uninstall all these and then install itunes - that seesm to have fixed it, though now i am sync fail - that's a different matter perhaps

  • TS1381 My left arrow does not work on my macbook pro(model A1226).  I have reset nvram, performed a safe boot, pulled the cache to desktop, replaced .globalpreference.plist, test all other keys with keyboard view (all others work)  - HELP!!

    My left arrow does not work on my macbook pro(model A1226).
    I have reset nvram, performed a safe boot, pulled the cache to desktop, replaced .globalpreference.plist, & tested all other keys with "keyboard viewer" (all other keys work except for the arrow). 
    In addition, I have gone thru all the recommended checks with universal access and have booted from snow leopard dvd and the left arrow still does not work. 
    I have tried using the left arrow key in all of applications I use such as: excel, ms word, address book, calendar, iphoto, terminal, & highlighting an icon and using the arrows to move to another selected icon.
    Here is the kicker!  In addition, I purchased a logitech solar bluetooth keyboard and the arrows work fine with my ipad but do not work when paired with the macbook pro. All other keys work fine on the macbook pro using the bluetooth keyboard.
    I believe this says that the problem is not in my macbook pro keyboard. So where can it be?
    Can anyone think of any other rabbit holes I can search?
    thanks and regards
    vats3

    I would also like to add that I've reverted the two cd drive and hard drive mods I did and the laptop is back to factory hardware and there is 0 corrosion or mold visible.

  • I have no problem connecting my i-phone programs to my tv through apple tv. but one program from an application from appstore don't go through apple tv. It says an error occured while loading the content.This is just for one program. All other works good.

    My apple TV works fine with my I-Phone 4s. But one program from one of the application I downloaded from the app store dont work. When I load that a message comes "an error occured while loading this program" This is  only for one program all other most of the time works good. Any one knows why ?

    Hi there Mundaplackel!
    I have an article here for you that can help you troubleshoot the functionality of that app that you have purchased from the app store, and should be able to give you some steps that will help you resolve the issue:
    iOS: Troubleshooting applications purchased from the App Store
    http://support.apple.com/kb/TS1702
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • Can't communicate with HP8600 from ONE computer only .. all others work

    I'll try to provide as much detail here as I can . But ... my HP8600 works well with all devices in my home but one desktop. Unplugging my wireless router solves the problem ... but ... only temporarily . problem returns . Three other wireless laptops and devices communicate just fine. Desktop computer is connected to Wireless Router via ethernet cable.
    OS = Windows 8.1 , 32 bit
    Wireless Router = Netgear Nighthawk R7000
    HP 8600 N911g, SW Version = 028.000.1315.000, Driver = 09.84.00.1173, firmware=CKP5CN1334ER,
    uninstalled and reinstalled HP software with no luck.
    Wirelss router shows device connected and active... and all other devices can print to it
    Windows updates , Netgear updates, and HP8600 updates are ... well .. all up to date.
    This is driving me crazy !!! Great printer , but ... geez ??? Any help is DEEPLY appreciated

    Hi mjeguitar,
    I understand the printer is working wirelessly and wired with all of your computers except for one. Are the others computers 8.1 as well or just the one that is not working well?
    From what you described, the printer will work with the computer after you unplug the router and plug it back in, but only temporarily. For diagnostic purposes, would you be able to connect an Ethernet cable from this computer to the router as you have done with the desktop? I just want to be able to eliminate the wireless within that computer.
    I can't help but wonder if for some reason that particular computer is loosing connection to the network, thus loosing connection to the printer. Because the other computers continue to communicate with the printer, I feel the issue is related to the computer and not the printer.
    Let me know how this works out, and post back with the answers to the few questions I have asked, I will gladly follow up with our next troubleshooting steps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Backend RFC change makes all MBO's stop working

    I created an MBO using a SAP RFC.
    I had to later change the RFC and remove one field (PRODUCT_GUID) from the return list.
    I then deleted and recreated the MBO with the changed RFC signature.
    Now, whenever I make an MBO call, I get an error saying the field PRODUCT_GUID was not found.
    This happens irrespective of which MBO request is made.
    There are no relationships and no other MBO references the PRODUCT_GUID field.
    The exact error is worded as follows.
    Sybase.UnwiredPlatform.WorkflowClient.RequestFailedException: java.lang.RuntimeException:Field not found for column 'ET_LIST_RESULT.PRODUCT_GUID' and key '/ET_LIST_RESULT[-1]/PRODUCT_GUID'.
       at Sybase.UnwiredPlatform.WorkflowClient.Responder.ProcessSyncRequest(ContextData oContextData, String sData)
       at iAnywhere.MobileOffice.AMP.PluginProxy.RunSyncRequest(PluginCallContext oCallContext), details= Error: 1053 Native Error: -2146233088 Message: 'Sybase.UnwiredPlatform.WorkflowClient.RequestFailedException: java.lang.RuntimeException:Field not found for column 'ET_LIST_RESULT.PRODUCT_GUID' and key '/ET_LIST_RESULT[-1]/PRODUCT_GUID'

    Hi,
    You have to remove the filed and key of PRODUCT_GUID from workflow packages. Open your workflow package and view the properties, all the key values would be listed in "KEY" tab. Remove the unwanted key which you have specified in your question. Deploy the workflow package once again, when deploy make sure "Update generated code" be enabled. Before regenerating code, take backup, otherwise all the UI work will go off.
    Regards
    Yokesvaran K

  • Class Not Found - IE, all others work

    Hello,
    following problem:
    I've written an Applet with forte4java 4.0. It works fine with NS, Mozilla, Opera. But with IE (5.0,5.5,6.0) I get a Class Not Found Error? I've tried EVERYTHING, and while searching the Web, I found Applets, that act similar. So I created an Applet whith the following empty Methods:
    init, destroy, start, stop, paint, repaint and run.
    The same result!
    So I took the eclipse IDE and compiled it -> It worked !???
    Same whith JBuilder.
    So, I love the Forte IDE but this f..., stolen me 'bout 12 hours of work. So any suggestions? Am I have to change Settings?

    this applet is only one class, myMenu.class. And the class which isn't found is myMenu.class .
    I've tested again and recognized that when I compile this class , which consits actually only of an empty init Method, with Eclipse, it can be found in all Browsers, but if I do this a few times the same 'Class not found' is shown in all IE. With forte it's allready, when compiling it first. I'm at this point to believe this is f...ing win ME.
    Regards riedling

  • Can't load any my portfolios pages all others work

    I can load all pages from the finance page pull down menu execp the ones in my portfolios. I have cleared cookies and this did not help.

    It's not in Tools> Add-ons >plugins?  Should be Java Plug-in 2 for NPAPI browsers 13.5.0. What are you seeing there? I don't think it's called the embedding plugin any longer.
    Might try getting the Firefox 5 standalone application. Trash the current one and replace it. Doing this won't affect your Profile or any settings.
    http://www.mozilla.com/en-US/firefox/all.html
    If it's enabled, how can it be missing?
    If this doesn't work, ask here. No need to register. Make sure you put (Mac) in the title.
    http://forums.mozillazine.org/viewforum.php?f=38
    Message was edited by: WZZZ
    EDIT. Oops, may be different for 10.5.8. Was thinking recent Java update for 10.6. But try installing a new app anyway. In the past, this got me the latest Java plugin.

  • When in a call, skype makes all other noises go to...

    When ever im in a skype call using my headphones (Turtle Beaches that has a usb too to use) All My volumes go through the speaker off the laptop and only my call is in the headphones? Help?
    I tried clicking Do Nothing in communications and ive went to the headphones settings and clicked no priorities but still happens!
    Please Help, thanks

    syedaismatara wrote:
    Hi, When i call from skype sound culity very bad. Skype new version not working good. how can i get old version ?
    Hi!  It appears your concern is completely different from that of the thead starter.  Unfortunately, thread hijacking is not allowed in this site as such practice may bring confusion in the community forum. 
    please visit the link below on instructions on how to create a new thread.  most likely your concern can be easily seen and get accurate responses when placed in the correct section. thanks!
    Help Us Help You (How to Start a New Thread)
    all users, guest, visitors, advisors and superusers must follow this rule in order to maintain order and avoid confusion in the forum site.  from the title of the thread any user can easily know what the thread is all about.
    IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
    ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES
    SEE MORE TIPS, TRICKS, TUTORIALS AND UPDATES in
    | skypefordummies.blogspot.com | 

  • Imovie won't let me "export as quicktime".  It is only for one specific project, all others work fine

    When I choose the option "export using quicktime", it starts the export and then just stops - no error message.  It works for all my other projects, but not this specific one - any ideas what could be wrong?  Fairly desperate as I am supposed to show this tomorrow!

    When I choose the option "export using quicktime", it starts the export and then just stops - no error message.  It works for all my other projects, but not this specific one - any ideas what could be wrong?  Fairly desperate as I am supposed to show this tomorrow!

  • IBooks application is frozen all others work, what to do?, iBooks application is frozen all others work, what to do?

    What to do when an application freezes such as what iBooks has don on brand new ipad2.

    Try closing the iBooks app completely and then re-open it : from the home screen (i.e. not with iBooks 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the iBooks app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Installed a wireless canon Pixma MX432 printer back in November for use with my Mac Book Air. All was working normally until this past week when I began getting a message, "printer not connected." What is going on? Netgear Wireless N Router seems to be ok

    My new canon Pixma MX432 printer is not printing. It was printing fine until about ten days ago. I use a Netgear Wireless N router, which is also new. What do I need to do. I get a message when trying to print that says "printer not connected." In addition, my old Gateway laptop will still print fine apparently because it has a cable connection to the printer. Puzzled!

    Have you tried rebooting the router? I would unplug it, wait a few seconds, then plug it back in. Be sure you know the password etc. if that doesn't work, try unplugging and rebooting the printer. Good luck!

  • FF will not start for ONE Windows 7 User. All others work fine.

    I try to start FF and it hangs. Loads into Project Manager, but no browser window.

    So then I need to amend the title to "firefox.exe -P works on all Windows USERS except one.
    Can I adjust the profile for User A from a Windows logon for User B?
    type into the Run dialog "firefox.exe -P" and the system just stares at me...no UI, no GUI, no dialog, nothing.
    and yes, I have uninstalled, uninstalled deleting profiles, started in safe mode, and uninstalled and removed all FF references from Regedit.
    I've done everything short of a rollback to ver 2.0

Maybe you are looking for

  • How many large screens can I run on a Mac Mini?

    We have several Mac Mini's around the network running large HD "TVs" without issue. However, I have a new install that requires two of the 40" screens running in a mirrored view. The Mini will be running Windows 7 32-bit (Sorry). Will the current gen

  • How do I point iTunes on a New Mac Mini to an External iTunes Library

    I have a 90 Gb (7000 tracks) iTunes Library sitting on a network drive that I want to "relocate" from my Powerbook to my new Intel Mac Mini. Or rather I want to point iTunes on the new Mac Mini to the existing Library. How can I achive this and still

  • How to zip multiple files using plsql

    Hi All, I have created a group of files using utl_file and stored in a specific directory. I want to zip them all so that i can send it throug email. Could you please help me to write a pl sql program which can do the above. Thanks Kiran

  • Persistent messages from a stranger.

    I'm getting messages from "wynnbailey268". They're blocked and the explanation shown is "You are currently blocking messages from users who are not in your contact list. To communicate with this user you will need to either add them to your contacts

  • Get the MFG_ORGANIZATION_ID profile

    Hi, I'm wroking with a EAM custom OA Framework form. I need to send or get the MFG_ORGANIZATION_ID in this form, to apply in my LOV's. How can I get it? Thanks Marcos Alonzo Pineda