The Thread which won't let go...

I posted very late last night and those who responded were a big help. Still, even though I changed my code I'm worked my way right around into a big circle and the exact same stopping point. Here is some sample code to try to simplify my complication.
I'm attempting to complete an assignment (due in a few hours) lol... which is supposed to be an "application" not an "applet". It's a lesson in multi-threading. Supposidly there is a main thread which drives everything, several processing threads and a thread which prompts for input. I've got the Thread which prompts for input working just fine as well as the others. However, whenever one of the processing threads begins to process the data, I get no further DOS prompt from my input object until that Thread has completed. I'm going nuts trying to figure out how not to have this happen.
I'll make an attempt at a simplified version of what's happening below:
class mainThread impliments Runnable(){
    public void run(){
        while(true){
           //call inputThread object
           dataprocessor();
           //call processorThread object
    public void dataProcessor(){
        //processes data & calls on other methods & objects
        //to help
class processorThread impliments Runnable(){
//several of these objects are created to process data
class InputThread impliments Runnable(){
//has two methods as given to us by instructor
    public String method1(){
        //involks prompt requesting Strings or characters from user
        //  returns String
    public int method2(){
        //involks prompt requesting integer from user
        //  returns int
}The problem is when processorThread object is called, everything stops and waits for it to complete. Help!!

A thread has 3 elements;-
- start()
- run()
- stop()
controlled by boolean values if(myInt==myCondition){
  myThread.stop();   // method is depricated as it may not stop 'cleanly' and thrfr = memory prob's
  nowPutTheCatOut - etc
// Better method;-
public void start() {
if(myCondition=false){
  myThread.run();
// X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*Hope that helps

Similar Messages

  • I want to update my phone, but i purchased many apps and music on the phone. it won't let me authorize my computer so i cannot update. i don't want to deauthorize all my computers. how can i find out which 5 computers i have authorized?

    i want to update my phone, but i purchased many apps and music on the phone. it won't let me authorize my computer so i cannot update. i don't want to deauthorize all my computers. how can i find out which 5 computers i have authorized? also how can i update the software?

    This is a tedious solution, which is stupid!  And some users report an inability to reauthorize a computer after an "en masse” deauthorization.  I can’t believe Apple doesn’t provide a list or menu to find out which computers you’ve authorized! Obviously, APPLE knows (or else they couldn’t tell us how many computers we have authorized)--so why can’t they give us access to that information about our own computers??!!!
    And for an already-authorized computer with a hard drive that’s since been replaced and upgraded from Mavericks to Yosemite, would it be recognized as a “new computer” and require authorization? Would its previous incarnation (i.e., with the old hard drive and OS) be considered a separate computer? Some users report they can’t authorize a computer after an OS upgrade because of that. Can’t believe we have to do such a bass-ackwards kludge!

  • TS2942 I want to delete a file off a thumb drive but get error 1407 which won't let me delete or trash the file.  What do I do?

    I want to delete a file off a thumb drive but get error 1407 which won't let me delete or trash the file.  What do I do?

    Hmmm, what Format is the Thumb drive?
    In the Mac/AFP world...
      errFSNotAFolder               = -1407, /* Expected a folder, got a file */
    Is there perhaps a colon or Backslash, or slash in the filename?

  • I have Premier Elements 12 and recently changed my computer to an iMac. I want to re-register my software on the iMac but the Adobe system won't let me. Anyone have an answer? Cheers Brian

    I have Premier Elements 12 and recently changed my computer to an iMac. I want to re-register my software on the iMac but the Adobe system won't let me. Anyone have an answer? Cheers Brian

    Brian Chapple
    I did not see your post 4 until after I had posted just now.
    That is one of the drawbacks related to purchasing Premiere Elements as a download from Adobe...the download is specific to the Windows or Mac operating system to which it is downloaded. So all you have purchased that way are the installation files and a serial number for Premiere Elements 12 Windows. If you had purchased Premiere Elements 12 in the box packaging, that comes with a disc for Windows and a disc for Mac.
    How long ago did you purchase Premiere Elements 12 Windows? If within 30 days of purchase, you can look into a 30 day money back from Adobe. But you cannot purchase the box packaging from Adobe. It only offers the download purchase from it. You would have to buy from an authorized reseller if you wanted the boxed purchase.
    The way it is now, you will need to purchase new installation files and serial number for Premiere Elements 12 for your iMac.
    That is the situation that I believe exists. More information if needed.
    ATR

  • I have an iphone 4s.  I have a mac computer and a pc.  Most of my itunes library is on my pc, but when I try to add music to my phone from my library on the pc, it won't let me do it.  I CAN add music from my library that is on my mac, same account.

    I have an iphone 4s.  I have a mac computer and a pc.  Most of my itunes library is on my pc, but when I try to add music to my phone from my library on the pc, it won't let me do it.  I CAN add music from my library that is on my mac, same account.  My husband has the same problem with his iphone 4, but only uses pc.

    My husband and I are using the same iTunes account on all mac & pc computers, but the libraries are different on each machine.  We always manually manage our music (no auto sync).  iTunes is up to date on the PCs.  My husband uses our joint iTunes account on his pc, but once again, has a different collection in his library from those on the other machines.  He can't load any music from his PC to his iphone 4.  I can load music from my mac library to my iphone 4s, but cannot load from my pc library to my iphone 4s.  How can I switch my main library that it syncs with from the mac to the pc?
    Thanks

  • The Facebook app won't let me sign on with my account. I can sign on to another account just fine. Will not let me sign on through Safari or Google either. When I put in email and password it goes right back to the log in page. Help?

    On my iPhone 4, the Facebook app won't let me sign on with my account. I can sign on to another account just fine. The first time I sign on with the FB app it goes to the news feed page, says loading, and then flipps between loading and connection error.  If I close out of that and try to sign in again it locks up on the logging in page.  From Safari or google it goes to the log in page, after entering my email and password it goes right back to the log in page.  I have tried resetting my phone, deleting and re-installing the app and everything else I can think of.  Since I can log onto another account on my phone it can't be the app, any ideas would be greatly appreciated! Thanks

    Sounds like a hard reset is in order...

  • The facetime app won't let me sign in anymore any ideas? It keeps saying 'an error occurred during the activation, try again' what shuld I do?

    The facetime app won't let me sign in anymore. I've been using it fine since Christmas, I haven't used my iPod Touch for about 2 weeks and now when I try to sgn in I get the message 'an error occurred during the activation, try again' what should I do?

    After reading some posts, I see that it is cause by the date and time changing. I reset these ad now Facetime works OK

  • On my home wireless network, the iphone 5 won't let me enter the IP address, subnet mask and router info. I was able to enter the DNS and Search Domains. How do I open up those fields?

    On my home wireless network, the iphone 5 won't let me enter the IP address, subnet mask and router info. I was able to enter the DNS and Search Domains. How do I open up those fields?

    Apparently the router is not sending the info to the iphone. How can I make that happen?

  • HT1212 I've forgotten my ipad passcode but when I try to restore on the computer it won't let me as I have to turn "find your ipad" off but i don't know how when I can't use the  ipad itself. How do I do this on the cloud?

    I've forgotten my ipad passcode but when I try to restore on the computer it won't let me as I have to turn "find your ipad" off but i don't know how when I can't use the  ipad itself. How do I do this on the cloud?

    If the iPad was running iOS 7,  iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818
    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • My vine got felted and I didn't do it and the App Store won't let me re-download it

    If anyone has any help please help!My vine got felted and I didn't do it and the App Store won't let me re-download it

    What happens when you try to redownload by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store         

  • I won't put firefox 5 until it will let me have my google toolbar which the new firefox won't let me have

    Don't you stupid people get it? People that like their google tool bar can't have it with the new firefox 5 Just fix that and then maybe Ill stop getting pop ups asking me to change it to 5 where it won't let me have my google toolbar. Just fix it and I'll gladly upgrade because 5 is a downgrade

    '''lazarusnumber2''' said:
    *''Don't you stupid people get it? People that like their google tool bar can't have it with the new firefox 5 Just fix that and then maybe Ill stop getting pop ups asking me to change it to 5 where it won't let me have my google toolbar. Just fix it and I'll gladly upgrade because 5 is a downgrade''
    Be sure you are blaming the people responsible. See below.
    '''We are all unpaid volunteers, users helping other users. Control your temper, ask nicely and be patient when asking for assistance.'''
    Google decided that they will no longer produce the Google Toolbar for Firefox beyond Firefox 4. Future versions of Google toolbar will only work with IE7-9. Google Toolbar is not available on any other browser, even Google's own browser.
    *http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html
    *http://www.google.com/support/toolbar/bin/answer.py?answer=1342452&topic=15356%29
    *Google Toolbar 8 FAQ (IE only): https://www.google.com/support/toolbar/bin/answer.py?hl=en&answer=1111588
    Alternatives:
    *http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    *https://addons.mozilla.org/en-US/firefox/addon/googlebar-lite/
    *https://addons.mozilla.org/en-US/firefox/addon/gbookmarks-google-bookmarks-fo/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]

  • Whenever I try to connect to my wireless network (which may or may not be the problem) it won't let my try to type in the password... It will just say "unable to connect"... WHAT DO I DO?!?

    I forgot the password, but remember it now, but it won't let me try to type it in..

    Try Settings>WiFi>Your network Name>Forget this network. Then go back to Settings>WiFi>Your Network Name. You should get the option to enter the password again.

  • Some of my tunes are assigned to a former email address and I can't remember the password. The security questions won't let me pass my date of birth, which they say is incorrect! I think I know my DOB. What can I do to remedy this

    My laptop now has a different email address so there are certain tunes that won't play as hey are assigned to the old address. I can't remember the old password and the security question won't allow me past my date of birth, which they say is incorrect!! I certainly know my DOB. Is there anyway I can unlock these tunes?

    Have you exhausted the options here?
    https://iforgot.apple.com/password/verify/appleid
    tt2

  • HT201272 For some reason tune purchases have vanished from my computer and ipod, i checked my purchases and it thinks they are on the computer and won't let me redownload them. What do I do?

    So i puty my Ipod in to charge a few weeks back and then the next time I went to use it I found a bunch of songs missig so I plugged it back in and found Itunes still listed but when I click on them it says it can't find them. I brought up my purchases on Itunes and it says they are on my computer and downloaded, won't let me re-download. How do I fix it? I really don't want to have to buy them all again or something.  And why is this whiole thing so slow?

    Also consider using vlc as the player which can handle a wide range of video formats as well.

  • How do I change my old apple ID to the new one/won't let me access

    I recently changed my apple ID. Everything I turn on my phone, it asks me to login into my apple ID but the old one keeps popping up instead of the new one. When I put in my passcode, it says that the ID or password is wrong...which is expected because my old apple ID still comes up...and it won't let me do anything on my iphone. I can't reset it, delete my account, or anything because the old apple ID still comes up. How can I change this. I have the iphone 4s by the way and it is updated to IOS 7, i don't know if that changes anything. Thanks.

    have you managed to resolve this problem as i have the same one?

Maybe you are looking for