Why can't I just take a break timer

Hello

I also have a timer.scheduledAtFixedRate of use problem: i in another thread. the problem is, that when some action happens, I must interrupt this timer, and when another action happens I have to take it back. It looks more or less like this:

public void run() {}

If (something1)

{

timer.scheduleAtFixedRate (TimerTask, (EDT) 1, 2);

}

{if (something2)}

{Synchronized (Timer)}

Timer.Wait ();

}

}

{if (something3)}

Timer.Notify ();

}

}

the problem is - I can't pause! Wait () method does not work and I don't know why... the only thing that works is cancel() method. but I don't want to cancel my timer I need to pause until 'something3' comes...

Can you please suggest me something?

PS. I also tried to use a flag, sth like this:

public void run() {}

Boolean flag = true;

If (something1 & flag == true)

{

timer.scheduleAtFixedRate (TimerTask, (EDT) 1, 2);

}

{if (something2)}

flag = false;

}

{if (something3)}

flag = true;

}

}

but this also not hang (even did not prevent!) my timer...

I will be gratefull for your suggestions...

concerning

I solved the problem.-i. use of the wait() method but in an object that extends TimerTask! I have a boolean - if it's wrong then I put wait() on my thread, when Boolean = true I use notify(). and finally, it works as I wanted!

concerning

Tags: BlackBerry Developers

Similar Questions

  • Why can't I just move on with windows7 starter to windows 8, my computer is only 9 months since purchest?

    Why can't I just move on with windows7 starter to windows 8, my computer is only 9 months since purchest?

    So it will not uninstall then install my programs, or what, then another question is the offer for $14.99, that's what I was watching and I filled a free upgrade and probably has not been fully tested for this upgrade, he said I would be able to get the upgrade, but there is no decrease in my emails guess still in work. While {s it improves just $ 40 million that I should wait for a version pro or ultimate?

    And what will happen to my saved files?

    and I'll be able to restore to the factory with warranty setting and I can use my series to my computer for the upgrade?

    NOW please if you don't know it please tell me I would like to know some facts and since there is so much development, in my view, the pro version is yet to come, so...

    Windows 7 Starter is not eligible for the offer of $14.99.  Only Windows 7 Home Basic, Home Premium, Professional and Ultimate. If you must upgrade to Windows 8, then you have to wait on the upgrade $ 39.99 for Windows 8 Pro that will become available October 26, 2012.

    The upgrade will allow you to keep your applications, personal files and settings.

    Yes, it should be able to restore the factory State, but always backup before making changes on your computer like installing an operating system:

    http://www.notebooks.com/2009/10/24/how-to-backup-your-installation-of-Windows-7/

  • Why can't I just run netsh wlan show drivers on my windows desktop 8?

    Original title: on wify

    Why can't I just run netsh wlan show drivers on my windows desktop 8?

    Hello

    Please answer a few questions to refine the question.

    1 are logged as administrator? What exactly is the problem you are having?

    2. what happens when you enter the command?

    3. do you receive any error messages?

    Make sure that autoconfiguration WLAN service is started in the Services. Otherwise, you can start the service and check the results.

    Autoconfiguration WLAN service is a service which configures wireless connectivity and security settings.

    a. press the Windows key + R and type "services.msc" and press ENTER.

    b. in the details pane, under name, access the autoconfiguration WLAN Service.

    c. right-click the autoconfiguration WLAN Serviceand click Propertiesand then click the general tab, do the following:

    d. in Startup type, select Automatic.

    e. the Service status, click Start.

    f. click OK and check the status.

    Hope this information helps. Provide more information so that we can help you.

  • Why can I not just use DreamWeaver?

    I bought a subscription to DreamWeaver, almost a year ago, but whenever I try to open the program, it tells me that my trial period has expired. When I followed the instructions "Of this software license", he told me to open a session and wonder a serial number. When I type the serial number: exact serial number that is listed under my username and password - it tells me the serial number is not valid. Why can I not just use the software? I had to pay a monthly fee for 11 months now, and I have to go through this charade whenever I comand to use the software. Used computers for 30 years and never experienced something like that. Any advice?

    Hi JohnLynnBob,

    You must remove all the entries of Adobe since the 'hosts' file in your computer.

    The location of the hosts file is

    For windows:-C:\Windows\System32\drivers\etc\hosts (open it with Notepad)

    For Mac:-Finder window Open---> click on top go---> go to folder---> Type '/ etc'---> press enter - hosts (open it with text edit)

    If you see all the entries in the hosts Adobe file delete them, save the file and then launch the product---> license this software---> identify you---> the subscription will be activated.

    Thank you

    Kapil

  • I can't save my PDF files. When I hit Save as an empty window appears instead of a menu of files or folders Windows Explorer view. I'm a Publisher and save files under new names of files after changing them. Why can't I just save these files in Adobe DC (

    I run Acrobat Professional so that I can change/brand place/comment in the PDF files. At one point recently I noticed "Acrobat Reader DC" in the name of the file at the top of the page. I do not have ask this or do anything to get there that I was aware of this. I adjusted for the new look of the screen and edited several files without incident. But yesterday, I opened a large file which had been addressed to me in Dropbox. When I downloaded and opened it and tried to change it, the selection tool was not aligned properly, so the selected areas were elsewhere on the page, where the cursor was. I restarted my computer and was able to change the file more or less normally (I noticed more little glitches with this CD player but I can live with them). But when tried to save the file with a new file name, like I always do to differentiate files that changed since the original files, the save window is empty. There is no option to save the file with a new file name. In fact. There is no option to save the file with the changes! I thought maybe it was a problem with this file only, but when I tried to edit a file provided by regular e-mail, I met the same problem trying to save to a new file name. What is the relationship between my old Acrobat Professional and Acrobat Reader DC? Why can't save files normally? I managed to save the changes I did by saving it in the cloud to Adobe (I had to then because I could not send the file by e-mail because of its size - I tried to send it to me)., but I'd rather widely navigate in Windows Explorer to work with files. I suspect that there is some simple aspects about what I am simply absent or do not know. Can anyone help?

    Hi Nathalie,.

    Please take a look at this thread and let us know if we get to the brand:

    "Save as" box pop up does not allow me to save the document.

    Best,

    Sara

  • Why can't I just enter password storage iCloud

    Why can't I enter password to buy more storage iCloud with iMac?

    This seems to be a bug recently. If you have a device (iPhone, iPad...), try to go into settings/iCloud and buy the storage.

  • Marking multiple files - why can't I just check it?

    I've been tagging of individual files by selecting from the film, and by checking the box next to the tag in the keyword list Panel.  That works fine, but sometimes I see a group of photos requiring the same tag.  Why can't I select them all, then check the box as I do for a single file?  If I try, it applies the tag to one of them.

    It seems that I have to drag all the photos selected on the tag instead.

    Which would be ok if that's what you had to do for a single photo, but it's not.  Why the difference in operation for multiples and singles?  There is a logic behind this inconsistency?

    You can try to use the tool of painter (or spray).  With this you simply set the keyword in the adjacent box and then simply click on the image in the grid to apply it.  A very quick way to apply keywords.  By clicking again on the same image removes the keyword.

    Colin

  • Why can't everything just cancel my creative cloud?

    It does not help me in LR and I want to cancel, but now I tells me I have to pay up to 50% of the one year subscription.   An I've dealt with before adobe and they overcharged me for a product, and I had to jump through hoops to get a refund. But they refund my money... so I thought I would give them another chance, but never again.

    I tried the plan for 2 months, it does not provide an improvement for me.  And they won't let me Cancel.

    Never again, adobe, ever.

    Cloud Plans https://creative.adobe.com/plans

    -Subscription conditions https://www.adobe.com/misc/subscription_terms.html

    -Purchase of FAQ https://forums.adobe.com/thread/1926340

    This is an open forum, not Adobe support... Click below to contact Adobe staff for help

    While the forums are open 24/7 you can't contact Adobe support at any time

    Chat support: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Why can't Adobe first Pro CC 2014 time remap Audio and Video together?

    In case you haven't noticed, my question is WHY.  I don't know why Premiere Pro can't do that.  What I understand at the moment, the only way to time remap audio in anyway shape using the software Adobe is Adobe After Effects, that my computer has no chance of ever being run through.  I know how to stretch a regular hearing and Premiere Pro audio, but apparently I can't time remap audio using these programs.

    So why can't Adobe Premiere Pro time-remapping audio with the video?  What is the reason that he can't?  It's a disappointment, huge and very impressive to see in the future.  If it is possible to time remap audio and video in After Effects, which is great and all, except for the fact that I can't use this program.  Why can't we do in Premiere Pro, and it will be always possible in Premiere Pro?

    In addition, audio time remapping will become possible in hearing one day?

    This looks like a very good idea.  File a feature request:

    Adobe - feature request/Bug Report Form

  • Why can't we just keep XP?

    I have two older laptop (a Dell Latitude D610, aged about 3 1/2 years and a Dell Latitude C640, sold in 2003). I downloaded the Advisor to upgrade to Vista and Windows 7 on the D610 and it said that I needed a video card to get the "Aero" interface It is old laptops, and I do not use my laptop to a TV, download music or nothing like that. Everything I do is surf the net, to receive and send emails, do surveys online and store (mainly on ebay). Two laptops have XP Pro SP3 on them, and the double C640 boots with Linux Mint. I'm having no problem with a laptop. Why cant Microsoft build a Windows 7 for low spec PCs and laptops, or continue to offer XP (home or pro)? They would make a fortune by doing this. There are a number of these old machines still use and sell like hotcakes on ebay. The only way to get a retail XP is via Amazon or ebay and believe me, they are not cheap. In fact, the real retail versions (not OEM-for new PC only) XP Pro SP3 sells for almost as much as Windows 7 Ultimate, these sell for $ 270 to $ 300. This isn't chump change. It is the best OS (in addition to Linux) that will run on these machines. I do not put down the new technology of "fear of change". I, like many others, can't afford a new system. The only way I see Windows 7 will be when these older systems break down and buy one on ebay approximately 3 to 5 years and then, it will be Windows 9 or 10. Get the point? Keep XP available and updated more income in the pockets of your business, instead of the pockets of traffickers. If a legal copy of the program is available, it is best for everyone. One day, all these old machines will be gone, then XP will not even be a question more. Prohibition has never been the answer in a free society. Keeping only not available XP, Linux will flourish, as well as piracy.

    You don't have to run Aero, it looks just better with it.  I have Windows 7 on my netbook (dual boot with OSX) and even if there is no way, it will never run Aero, it still works very well.

  • Why can't I just copy a profile to another system in the directory profiles and modified the ini file

    My main system crashed. I have a copy of the profile. When I move a copy of the profile in the profiles folder and edit the ini file to use the new name, I get a message that there is an instance of thunderbird running and I need to shut it down. I don't see any instance of thunderbird anywhere in the Task Manager. It happens just for me the fact that I am also in firefox may be the cause of the problem to a running instance. I'm under V31.7.0

    I tried to simply move the mail directory in the existing profile. The thing is that I don't see the old messages. I can see all of the subfolders of the Inbox on the left but not messages in the right pain. I can see new messages, but it's all in the Inbox and not filtered to the subfolder.

    I tried to activate the function of multiple profile but that doesn't seem to work.

    MY BAD
    It seems that I had something that was bad in the profile. I got the profile from a backup and now Thunderbird works fine.

    Sorry that I missed the problem earlier.

  • Why can't repair just firefox so it doesn't have all these pop up messages like a script has stopped or my mouse just freezes and GISH, I started using google

    While several times I get this in the bar "does not", title avg pop up and say it's a memory used as 270 MB per facebook, I use popup blockers, not track add me ons to speed page loading, I repeatedly to make another script msg pop ups, it's upset me so just try to surf on facebook! If I click on a link, to go off facecbook to read an article you need to for all the nonsense to load the banner adds or what have you I don't know what to do, then I goto your help section and its GISH as I have to be a guy TI to understand all this. I've abandoned IE for many years for security reasons, came to firefox and loved, but it is a battle. Can there someone do an easy way to fix this shit? Thank you

    Make a check of malware with several malware scanning of programs on the Windows computer.
    Please scan with all programs, because each program detects a different malicious program.
    All of these programs have free versions.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

  • Why can't I just press ENTER to go to the page when I have the full URL text typed in the address bar?

    I do not know; Maybe I'm just crazy, but I swear, until I downloaded FF4, I used to be able to (1) type in a full URL, or (2) a URL or a partial keyword and choose what I wanted in a drop-down of recent URL, and then press ENTER to be redirected to the page I was looking for - all in the address bar without having to use my mouse click on the small arrow buckled at the right end of the address bar (next to the star of "favorite").

    This will be caused by an add-on that does work properly with Firefox 4. the procedure described in the following link can be used to identify a cause your problem - https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

    The AVG Safe Search add-on caused this problem for some people.

  • Why can't I just spend 10.7.5 to El Capitan on my early 2008 13 in. MacBook?

    I recently upgraded from 10.6 to 10.7.5. And while I'm happy with it, I thought, since I met the requirements of the system, I would upgrade to El Capitan. So when I went to do, he said I couldn't. From what I can tell, I have enough memory for it. So I do not know why it will not be upgraded. Any ideas or advice are appreciated.

    Because EFI computer is 32-bit. Mac OS X 10.8 and newer require a 64-bit.

    (138460)

  • Why can't I just send Envoy massage to my friend and family

    tell me why I can't farward massage

    • Version of Windows?
    • E-mail program?
    • What happens when you try to forward a message?

Maybe you are looking for