Kill a thread does not

Hi all

I have a question about the best way to kill a thread does not. My request has been implemented with two sons:

1 update thread - to extract the values from a web service using JSR 172 created heels
2. view the Thread - to display the retrieved values

Each thread runs in its own period of time - say if ever 60 seconds Update wire passages and the display thread runs every 30 seconds.

The issue I'm having is when the update thread tries to retrieve the data from the web service and for some reason any received no response - the queue of messages is completely blocked and the application ultimately ends.

My solution was to introduce a third thread that would check every 5 seconds if the update thread is still running (I store the status in a singleton class) and if it is to kill this thread. However, it did not really work as once the update thread sends a response to the queue of messages is completely blocked (my explanation - not sure) that he won't let even the kill wire (wire n ° 3) run.

Is there a better way, or is there a way to make sure that the thread to kill and take control of the message queue?

Thanks, I hope that everyone is having a good weekend!

You must use the discussions here. HTTP requests throw exceptions of time-out, but they may not be processed correctly, unless they are in a thread. IIRC, using inokeLater for HTTP requests put on the wire of the main event, which is bad.

Tags: BlackBerry Developers

Similar Questions

  • Step failed in New Thread does not display in the report

    Hello

    I call a sequence of sub in a 'new topic '.  A step inside this sequence of subroutine fails.

    The end result is the Test failed because it is supposed to be, but the step failed does not show.  (I show not only failed in the report).

    Can it be fixed?

    Thank you

    Rafi

    It is correct. If you look at the entry Point of the execution of the process template, you'll notice that once completed execution of the main sequence, the generation of reports and other things start.

    If spawn you a sequence in the new thread from the main sequence, MainSequence could finish before the subsequence ends its execution and the results of the sous-suite propagate to MainSequence. So as Ray mentioned, you can force the MainSequence expect the subsequence full run using a queue time.

    See attached screenshot and/or example:

  • List of threads does not update itself

    2 hours ago, I posted a thread in vmplayer-article - the new position directly updated the list in 'my discussions '.

    But so far, it does not appear in the list of the vmpl discussion; Ayer-section.

    This also occurs on other sections...

    Very irritating sound that you cannot see your own answer - as if calling it "my discussions that it can be displayed.

    A browser refresh does NOT help

    ___________________________________

    VMX-settings- VMware-liveCD - VM-infirmary

    At the time you reported this, we had an operational problem that caused higher than normal on the system and eventually caused load one of the nodes to restart.  Threads will appear in the thread view is probably caused by the heavy load / node restart, so now that the system is working correctly, the problem is no longer.

    However, if you see this again, please post here to report it.  Thank you, Robert

    Robert Dell'Immagine, Director of VMware communities

  • printer (hp 6500) error #6x61011beb printer does not print

    I installed new black ink cartridge.   Printer says that there is an error?  the number is at the top of this page.   Do not see where I put the wrong cartridge.  If I did, it would not so say?

    Hello bunk bernice.

    From what I could find about this error code, it's a general error with the printer, having to with the ink cartridges or the return shipping.

    Here is a link to a thread on the forums of HP:

    http://h30434.www3.HP.com/T5/printer-all-in-one-install-and/general-printer-error-0x61011beb/TD-p/160899

    If this thread does not help, I encourage you to create a thread on the forums of HP and they will be able to help you much better that we can here because it's an HP error code.

    Let us know if you have any questions.

    Best regards

    Matthew_Ha

  • BSOD: "a process or thread crucial to system operation has unexpectedly released or ended." Startup Repair does not solve the problem-

    I recently had a serious viral infection on my laptop Windows Vista SP2 Gateway.  After you run the antivirus AVG cleaner, who seemed to have had to quarantine or delete some files infected, System I couldn't Boot Windows to the top on this machine - even in the (all flavors of) Safe Mode.  When you try to start, I'd get

    a Blue Screen of Death with the msg of error in the title of this thread.  Before turning off the crash dump, the system indicated:

    ' * STOP: 0X000000F4 (0 X 00000003 0X85F22848 0X85F22694 0X82A26AB0).

    Other messages in the BSOD said I might have new HW causing the BSOD (I did not - but nevertheless I removed all external HW and tried again - got the same result).

    So one of the first things I did was to capture the startup log, so I could see what the pilots were hang up / does not.  Here's what I found:

    (1) the last driver to load (as indicated in ntbtlog.txt) was monitor.sys.  My understanding is that this indicates that when this driver loaded, the system crashed at this place - suggesting that there is 'something wrong' with this particular driver.  However, it seems likely, that I can use the screen/monitor (built-in) to the laptop without problem.

    (2) several drivers do NOT load: they are:

    1 NDProxy.sys

    2 Kvhfjgcv.sys

    3 Kbdhid.sys

    4 i8042prt.sys

    QUESTION 1: "Monitor.sys" being the last driver to load, should I assume this is the driver the system hung up on (that is, which caused the BSOD)?  And if so, that means I should replace this driver?  If so, how do I do that (how and where can I get a copy of 'Clean/good' of monitor.sys)?

    QUESTION 2: Is it possible to get "good versions" of drivers I listed above which was NOT loaded (I guess they didn't not load because they have been corrupted by the virus or the virus cleaner, or maybe just deleted by the virus cleaner because they were infected) to put into the Windows\System32\Drivers folder?  How?

    Here are the steps I took to try to fix the "corrupt system".  I inserted my Windows Vista DVD into the DVD drive and loaded Windows using that.

    Once that came, I then tried the following (and here are the results for all that I tried):

    (1) I selected the option "Repair", then choose "Microsoft Windows Vista" OS and press "next".  He tried to 'attempt to repair' for 15 minutes about, then finally stopped with a message: "Startup Repair cannot repair this computer automatically.  "Details of problem indicated: (a) the problem event name: StartupRepairV2." Signature 01: ExternalMedia; Signature 02: 6.0.6000.16386.6.0.6001.18000; Signed 03:6; Signature 04:131074. Signature 05: 0xF4; Signature 06: 0xF4; Signature 07:0; Signature 08:2; Signature 09: WrpRepair; Signature 10:5; OS version: 6.0.60090.2.0.0.256.1

    (2) I selected the option 'display diagnostic and repair details '.  He said that all tests successful (error code = 0 x 0), and

    then indicated the 'cause': ' unknown error checking: bugcheck f4, parameters = 0x3, 0x88607b80, 0x88607ccc, 0x82a78ab0. "

    - AND -

    Repair action: repair and checking the integrity of system files.  Result: failed.  Error code = 0 x 5

    (3) I checked that the restoration of the system, and even though I know I had some Restore Points created at the origin of this system, System Restore has indicated that there was no restore points to go back, (leading me to believe that the virus must have killed)

    (4) so I chose the selection "Command Prompt", which opens by default "X:\Sources >".  I'm in C: and then typed: "sfc/scannow".  The system has responded with the following messages:

    "Start system analysis.  This process will take time. " follow up 30 seconds later by the message:

    "Windows resource protection could not perform the requested operation".

    MAIN QUESTION: any reflection on what other tools and options I try to repair the windows installation / driver set?

    Hello

    I suggest you follow the steps below:

    Method 1:

    Follow the steps in the link and check if the problem persists:

    http://support.Microsoft.com/kb/958233

    Method 2:

    Connect over winre and rename the driver files that he talked with *.old quick order. You can find these % system32%. Follow these steps:

    a. use the Windows 7 DVD to start the computer from Windows Recovery (WinRE).

    b. in WinRE, open a command prompt. To do this, follow these steps:

    On the screen to install Windows, select the appropriate language to install, time and

    currency format and keyboard or input method options and then click Next.

    c. click on repair your computer.

    d. click 7 installation you want to repair, and then click Next.

    e. click on command prompt.

    f. navigate to % system32% and rename old files 8.

    Method 3:

    After step above the computer restarts. Run the System File Checker tool to troubleshoot missing or corrupted system files. Follow the steps from the link:

    http://support.Microsoft.com/kb/929833

  • I just spent an hour to compose a response in a thread ("Firefox does not with paypal"), only to see "You do not have permission" to submit - total loss!

    I was connected to respond in the thread "Firefox does not work with paypal. I spent the best part of an hour carefully compose this response, case tests, links, etc... [Tip: Firefox, unlike other browsers, has a problem with the server paypalobjects.comscripts.] Because I had taken so long to write the answer, she seemed to be a good idea to check in via the Preview button, but I received a message that the service was not available. Of course, I decided to submit it anyway, but when I hit 'submit' I got a message "you don't have permission...". "- at which point I (stupidly) on another page with this message, and what I wrote was gone!

    Anyway, it is definitely not normal that the site log out after only an hour. Sorry to hear about this. Maybe there was a little problem on the server with your session. If it is reproducible, I wonder if you have any software that could be quietly elimination of cookies for the inactive sites?

  • the call firefox.exe - ProfileManager does NOT open the Profile Manager does NOT create a new profile, KILLS the old session tabs, but all pinned!

    FF 7.0.1 on Win7 pro 64

    A behavior more bug / odd:
    calling "firefox.exe - ProfileManager".
    -do NOT open the Profile Manager,
    -does NOT create a new profile,
    -seems to do NOTHING (no change around records profile etc.).
    but...
    -KILLS tabs former session.
    -KILLS old session and leaves nothing to restore,
    -KILL all my pinned tabs!

    OK, I should downgrade to FF4.0.1, or same 3.6.x?
    These releases are much more reliable than 6 + 7 running!

    Try using this:

    Firefox.exe Pei

  • Update downloaded yesterday, now cannot get back in. ipad does not recognize the password id ot. help means your upgrade killed my ipade

    Please help me. My ipad has a great until I downloaded the update yesterday, now I can't get back in, does not recognize my address or password...

    the update killed my ipad. How can I get online?

    There are chances that you have purchased second hand iPad? If so, you will need to contact the seller and ask him to remove this iPhone in the devices list. Otherwise, your iPhone will be a useless brick.

    Find my iPhone Activation Lock: a mechanism of extraction of the previous owner - Apple Support

    If she does not accept your password:

    Check these items and follow the instructions.

    If you have forgotten your Apple - Apple Support ID

    If you forgot your Apple ID - Apple Support password

    https://iforgot.Apple.com/appleid

  • Windows update does not not no malaware or tried virus TDSS killer system all ok

    Windows Update does not work not turned after a clean installation, System don't own no malaware, nothing tried virus TDSS Killer everything ok.

    Bruno & sam,

    Try to reset the windows update components and verify if you are able to install.

    You can reset windows update components by referring to article:

    How to reset the Windows Update components? http://support.Microsoft.com/kb/971058/en-us

    06/02 / 1111:38: 14:00

  • The background thread alert does not work

    Hello

    I have read the article http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/... and followed the instructions to display the background thread alert. However, the alert is not displayed and IU locks (freezes). Specifically, the event of click/touch does not work, but the background thread continues to run.

    Structure of my program. The main class (with the main function) extends UiApplication. I create in the function main instance of the class that extends the Application. This class starts backgorund wire. I am missing something or making the wrong way?

    Sorry I have expired, I was going to write a long response to this.

    But in short, remember that your automatic boot process and your user interface process, both through main with different parameters and are the BlackBerry is concerned, different applications.  So it may be an Application, the other can be a UiApplication, and both can enterTheDispatcher.

    No two instances of the same Application, they are two different Applications.  They can be of different instances of the same Application class, but it is a special case.  It depends on what you create in the main routine.

    You can play a merry dance with such things.  For example, having a UiApplication be started by the automatic boot process, and then the boot gui process can find it and just put in the foreground, rather than creating a new UiApplication.

    Generally however people create a request and a UiApplication.  The problem with the use of these different applications, is that things like static are not shared.  Therefore, use something like RuntimeStore to share data.  It is a pain and something that if I can avoid.

    It is perfectly possible to have a UiApplication, which starts when the device starts, runs Background Threads that are working in a network and is bought in the foreground by clicking on an icon.  Code is more complicated, but not much.  And you must have complicated the code when you run the network Threads background to deal with the unit off power and then power anyway.

    Hope that clarifies somethings.

  • Hi, I am trying to drag the tip of the bottom of my tone curve to kill shadows, but it does not

    Hi, I am trying to drag the tip of the bottom of my tone curve to kill shadows, but it does not move... Can anyone help? *

    Click the point curve icon (red circle)

    Frans

  • Thread.Join () does not work

    I did a media player, and I use a database to store data, after playing a song for a while, I store the current position in the Pb, so I can continue to play the next time. I use a thread to update the db, so that he can play the next song at the same time what the db update.

    The problem is when I close the application, I want the event dispatch thread to wait until the thread of db update is finished, the code is:

    If (needWait == true) {}
    logThread.join ();
    }

    but it seems don't work and make the application non-response, where will not?

    A big loop on the thread of events blocks before the end of the loop.  But the OS won't know that the UI Thread is really busy.

    However, thread. Join blocks just the thread of events...

    So why don't; t it becomes sensitive?  There are all sorts of reasons.  Maybe the other Thread is not complete.  There may be something in this Thread that requires access to the event Thread, as synchronize the lock of the event or of nullity.  There may be something in this Thread that locks.  Or maybe the BlackBerry OS throws your Thread.join because it blocks the event Thread?

    I do not know, and to be honest, I'm not sure that this is not important.  The important think is here to get your code to work and to do so, in my opinion, you need to move your join off the thread of events.

    If you ignore this advice, it's good, I don't mind.  Your call - this is your code.  I've been wrong before, and I'll be wrong again.  But you have the best advice that I can give you.

    And I must admit that I never use thread.join, even in Background Threads.  I always use wait/notify.  But that's just me.

  • N5110 wireless DOES NOT WORK AFTER RE INSTALL WINDOWS 7, I NEED THE DRIVER without THREAD SPECIFIC please

    Hello

    My problem started when I re installed windows 7 Ultimate and everything worked perfectly including wireless internet connection

    Only free Wifi does not, I tried to download almost all of the drivers in the support page for the model my and still not identified, I even called customer service and they sent me the link to the pilot specific and still does not.

    Please help, any solution...

    THX in advance :)

    Good guys and finally I did it.

    I will talk about my missing driver, either (on the inside of the Device Manager) (NETWORK CONTROLLER), I just pressed on right click then properties, then you choose details... instead of the description of the device open and choose the lds material then simply copy the 2nd driver name and google it online, you will find free download from many sites thro web... I just did this and simply the wifi works perfectly now.

    :)

  • The markup extension does not work in the mail. It works fine in the preview.

    iMac, OS X 10.10.5...

    I tried and tried to mark an image in an e-mail message, that I'm composing. I have tried both a new message and a reply. I tried it with PNG, GIF, and PDF image files attached to the message. I found the suggestion of Apple to run "lsregister - kill - seeds" and did, my user account and under sudo. He many .bundle, .appex and a couple of files .opplugin, but none of them was the markup. I made sure the markup has been enabled in system preferences > Extensions.

    The small icon of menu drop-down appears in the corner of an image when I wave the cursor over them, but clicking on "Markup" in the list does not cause nothing to take.

    When I try to call the markup extension, the following text is written in system.log...

    Apr 12 16:50:08 {host.domain} Pkd [4900]: activation pid = 41013 for plugin com.apple.Preview.Markup (1) 120F1A87-AA89-4963-BB88-502448673078 /Applications/Preview.app/Contents/PlugIns/Markup.appex

    Apr 12 16:50:08 {host.domain} secinitd [30716]: No. AppSandbox current cache.

    Apr 12 16:50:08 {host.domain} [45426] markup: plugin sdk "com.apple.ui - service" unregistered

    Apr 12 16:50:08 - last message repeated 1 time.

    Apr 12 16:50:08 {host} com.apple.xpc.launchd [1] (com.apple.ReportCrash [45427]): endpoint has been activated through legacy launch (3) API. Please go to XPC or bootstrap_check_in(): com.apple.ReportCrash

    Apr 12 16:50:09 {host} com.apple.xpc.launchd [1] (com.apple.Preview.Markup [45426]): Service came out because of the signal: invalid statement: 4

    Apr 12 16:50:09 {host.domain} Mail [41013]: plugin com.apple.Preview.Markup interrupted

    Apr 12 16:50:09 {host.domain} Mail [41013]: connection Hub Domain = NSCocoaErrorDomain Code error error 4097 = "could not connect with a helper." (connecting to the service named com.apple.Preview.Markup) UserInfo = 0x610001876f40 {NSDebugDescription = connection to the service named com.apple.Preview.Markup}

    Apr 12 16:50:09 {host.domain} Mail [41013]:-error: error [ShareKit]-[NSExtension beginExtensionRequestWithInputItems:completion: error domain = NSCocoaErrorDomain Code = 4097 "could not communicate with a helper application."] (connecting to the service named com.apple.Preview.Markup) UserInfo = 0x610001876f40 {NSDebugDescription = connection to the service named com.apple.Preview.Markup}

    Apr 12 16:50:09 {host.domain} ReportCrash [45427]: report of incidents recorded version 1.0 (1) [45426] markup to /Users/ {MyName} / Library/Logs/DiagnosticReports/Markup_2016-04-12-165009_ (host). Crash

    Apr 12 16:50:09 {host.domain} ReportCrash [45427]: Remove excessive log: file:///Users/{myname}/Library/Logs/DiagnosticReports/Markup_2016-04-12-141435_ {host} .crash

    Oh, I found a few clues and worked on my fix.

    Referring to the thread Sharing feature works not well, I used

    sudo ls-leOR "/ Volumes/Macintosh HD/System/Library/Caches".

    "to determine that I had not 'limited' flags troubling my Caches. So I jumped to Linc Davis' 9 and 10 steps (in response to 13:40 February 9, 2016) and

    sudo/usr/libexec/xpchelper - rebuild-cache

    sudo/usr/libexec/AppSandbox/app_sandbox_cache_builder - rebuild-cache

    and now the markup extension works in Mail.

  • Tecra S1: Rf Ubuntu wireless switch does not work

    Hi all

    I recently bought an Intel mini-PCI wifi card for my Tecra S1 under Ubuntu. It is detected without any problem, Intel provides even native drivers for Linux. However, the hardware to activate wireless switch does NOT work. According to iwconfig, the radio is off. I use the ipw2200 driver which can detect the hardware and the software rf_kill. I can enable and disable software killing RF, but kill him material stays on.

    I suspect that the radio feature is disabled in the BIOS but I don't have Windows running on the laptop over to change the setting. Is it possible to access BIOS options under linux? Toshutils are not supported by the tecra because she seems to have a Phoenix BIOS.

    I hope you can help!

    Edwin...

    Hello

    Tecra S1 supports BIOS Toshiba you can access BIOS by pressing ESC at the beginning of the startup.
    In any case I think you won't find anything in the BIOS.

    If you are not able to use the switch of material on the side of the laptop then the Wlan card is not compatible or the hardware switch is malfunctioning. I would say that the card is not supported.

    Maybe the insulation of the 13 pin might help please check that this son:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=19843&MessageID=74074
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=15228&MessageID=56522

Maybe you are looking for