Dial the two thread simultaneius http

In my application I want a main (UI) Thread and two other thread that runs at the same time, now in both the wire I want HttpConnection appeal, so it is possible for both the thread do HttpCall?

I want to know - is it possible?

Because if one thread calls Http between another thread also do Http call connection so that it will give the error as "Stream already open" because the first thread was opened the stream and before the closing of the first stream son second thread will open the stream, so please help me on this...

Thank you

There is nothing on the Blackberry that will prevent both two threads made http URLs of connections to the same (or other) at the same time.

So the answer to your question is 'Yes it is possible. "

Ok?

Tags: BlackBerry Developers

Similar Questions

  • Two threads in a Panel

    Hello
    I am developing a vision with CVI application that loads the files. VBAI after login... the application interface has two positions (left and right)... I want the two buttons START calls the same function CVICALLBACK (Inspection)... and this function call the function ThreadFunction and its parameter's thread (thread number)...
    I said two tables of the elements to control the two threads and I worked on these tables in the treatment ThreadFunction function...
    Now, I didn't understand how I spend the number of thread for the CVICALLBACK inspection function, in fact, when I click START on left position inspection begins on the left, where it starts on the right, also, if I click on the two positions, she sailed on two positions...
    Thank you for your help, it's urgent

    #include 
    #include 
    #include 
    #include 
    #include 
    #include "toolbox.h"
    #include "nivision.h"
    #include "VBAIInterfaceC.h"
    #include "ann.h"
    
    static int panelHandle;
    static CmtTLVHandle tlvHandle = 0;
    static volatile int exiting = 0;
    
    static int Tab_serial_num[2]={PANEL_SERIAL_NUM,PANEL_SERIAL_NUM2};
    static int Tab_inspec_name[2]={PANEL_INSPECTION_NAME,PANEL_INSPECTION_NAME2};
    static int Tab_inspec_butt[2]={PANEL_INSPECT_BUTTON,PANEL_INSPECT_BUTTON2};
    static int Tab_ecr_acc_stat[2]={PANEL_ECR_ACC_STAT,PANEL_ECR_ACC_STAT2};
    static int Tab_led_metro_stat[2]={PANEL_LED_METRO_STAT,PANEL_LED_METRO_STAT2};
    static int Tab_led_vert_stat[2]={PANEL_LED_CPL_VERT_STAT,PANEL_LED_CPL_VERT_STAT2};
    static int Tab_led_rouge_stat[2]={PANEL_LED_CPL_ROUGE_STAT,PANEL_LED_CPL_ROUGE_STAT2};
    static int Tab_led_jaune_stat[2]={PANEL_LED_CPL_JAUNE_STAT,PANEL_LED_CPL_JAUNE_STAT2};
    static int Tab_lcd_off_stat[2]={PANEL_LCD_OFF_STAT,PANEL_LCD_OFF_STAT2};
    static int Tab_lcd_on_stat[2]={PANEL_LCD_ON_STAT,PANEL_LCD_ON_STAT2};
    static int Tab_main_window[2]={PANEL_MAIN_WINDOW,PANEL_MAIN_WINDOW2};
    static int Tab_test_stat[2]={PANEL_TEST_STATUS,PANEL_TEST_STATUS2};
    static int Tab_text_error[2]={PANEL_ERROR_TEXT,PANEL_ERROR_TEXT2};
    
    void DisplayError(VBAIError error);
    void ButtonStatDisplay(void);
    void IndicatorStat(int ind, bool32 stat ) ;
    static int CVICALLBACK ThreadFunction (int thread) ;
    
    /*static int SetupApplication (void);
    static int ShutdownApplication (void);*/
    
    int main (int argc, char *argv[])
    {   
    
        if (InitCVIRTE (0, argv, 0) == 0)
            return -1;  /* out of memory */
        if ((panelHandle = LoadPanel (0, "ann.uir", PANEL)) < 0)
            return -1;
    
    ...;
    
        ...;
    
        DisplayPanel (panelHandle);
        RunUserInterface ();
        DiscardPanel (panelHandle);
    
    if (stepResults != NULL)
        free (stepResults);
        vbaiCloseConnection (session, 1)  ;
    
        return 0;
    }
    
    void DisplayError(VBAIError error)
    {
        ...;
    
    void IndicatorStat(int ind, bool32 stat )
    {
        ...;
    }
    
    int CVICALLBACK INSPECTION (int panel, int control, int event,
            void *callbackData, int eventData1, int eventData2)
    {
        VBAIError error = VBAIErrorSuccess;
    
        switch (event)
        {
            case EVENT_COMMIT:
    
                !!!!!!!!! The problem !!!!!!!!!!                       
    
            break;
    
        }
        if (error)
            DisplayError(error);
        return 0;
    }
    
    static int CVICALLBACK ThreadFunction (int thread)
    {   
    
    ....;
    
            while(!exiting){
    
                    SetCtrlAttribute(panelHandle,Tab_inspec_name[thread],ATTR_DIMMED,0);
    
                         ;
    
                            switch(i) {
                            case 0: IndicatorStat(Tab_ecr_acc_stat[thread],inspectionStatus);
                                     break;
    
                            case 1: IndicatorStat(Tab_led_metro_stat[thread],inspectionStatus);
                                    break;
    
                            case 2: IndicatorStat(Tab_led_vert_stat[thread],inspectionStatus);
                                    break;
    
                            case 3: IndicatorStat(Tab_led_rouge_stat[thread],inspectionStatus);
                                    break;
                                   ;
    
                            case 4: IndicatorStat(Tab_led_jaune_stat[thread],inspectionStatus);
    
                                   break;
    
                            case 5:IndicatorStat(Tab_lcd_off_stat[thread],inspectionStatus);
    
                                   break;
    
                            case 6: IndicatorStat(Tab_lcd_on_stat[thread],inspectionStatus);
    
                                   break;
    
                         }
    
                         Delay(0.5);
                         ...;
    ...;
    ...;
    

    Hi schweini,.

    Your thread function prototype doesn't seem correct.

    His entry should be a void pointer, not an integer.

    To switch to the thread of your button on which it started, you can use this setting.

    But you will need to pass a pointer to a valid variable.

    In your feed, you will get the value of the data pointer dereferencing.

    Here's a code sample (nickname).

    See if it makes sense.

    //in your Start callback
    static int start; //static is crucial here
    
    switch (event)
    {
      case EVENT_COMMIT:
        start = (control == PANEL_START_1 ? 1 : 2);
        CmtScheduleThreadPoolFunction (pool, ThreadFunction, &start, &funcId);
      break;
    }
    
    //in your thread function
    int CVICALLBACK ThreadFunction (void *data)
    {
      int which_side;
    
      which_side = *((int*)data);
    
      while (!exiting)
      {
        if (which_side == 1)
        {..}
        else
        {..}
      }
    }
    
  • Merge two threads in the same person into one iMessage

    I know that this issue has been addressed before. Most importantly, the discussion was on did not understand what the problem is.

    So let me try to explain.

    Tarzan has an iPhone and an iMac, Jane also has an ios device.

    When Tarzan Jane sends an iMessage with his iPhone, Jane receives from "Tarzan" (the iMessage was related to his phone number)

    Now, when Tarzan sends Jane an iMessage of its iMac, Jane receives from "Tarzan", but in a separate thread. (This iMessage was related to his email address)

    Now Jane is in danger and she wants Tarzan to rescue her, she grabs his iPhone, opens the last conversation with Tarzan and Tarzan 'Help texts

    But Tarzan in the jungle and he has only his iPhone with him.

    Jane get killed because the imessage is sent to the iMac of Tarzan and not to his iPhone.

    ====

    The problem is, you get two threads in the same person, are sent to the e-mail address associated with the iMessage, one for the phone number.  But you can't see the difference between the two (except when you dig deep into the background-info).

    If my suggestion of Apple is, they appreciate Jane's life, fix this problem soon: merge those two threads into one.

    PeterSmith wrote:

    I know that this issue has been addressed before. Most importantly, the discussion was on did not understand what the problem is.

    So let me try to explain.

    Tarzan has an iPhone and an iMac, Jane also has an ios device.

    When Tarzan Jane sends an iMessage with his iPhone, Jane receives from "Tarzan" (the iMessage was related to his phone number)

    Now, when Tarzan sends Jane an iMessage of its iMac, Jane receives from "Tarzan", but in a separate thread. (This iMessage was related to his email address)

    Now Jane is in danger and she wants Tarzan to rescue her, she grabs his iPhone, opens the last conversation with Tarzan and Tarzan 'Help texts

    But Tarzan in the jungle and he has only his iPhone with him.

    Jane get killed because the imessage is sent to the iMac of Tarzan and not to his iPhone.

    ====

    The problem is, you get two threads in the same person, are sent to the e-mail address associated with the iMessage, one for the phone number.  But you can't see the difference between the two (except when you dig deep into the background-info).

    If my suggestion of Apple is, they appreciate Jane's life, fix this problem soon: merge those two threads into one.

    IMessage works as it should.

    There is also no apple here to read your thread in this forum for a user to.

    You can send your comments here http://www.apple.com/feedback/

    If Jane was smart it would always send you an imessage using your phone number and not apple id.  Here again, you can add your apple ID to imessage on your phone.

  • Divide two text frames linked in 2 images to separate the non threaded text

    I have more trouble with this.  CS4.

    What I am wanting to do is separate from the two sections, if it's the same answer.  I want that my stand-alone sections, not threaded. Thank you!!!

    In your scripts Panel, you will find one under Application > samples called Frame break.  Select the image, then click on that.  Fact!

  • I can't sync my phone to my computer and get the message that my phone doesn't have the latest version of Itunes. I downloaded the latest version on my mac, but what I do on my phone. I'm used to be able to synchronize the two.

    I am more able to sync my I phone on my Mac and get the message that my phone cannot be used because it requires a newer version of iTunes. He tells me to go to www.itunes.com to download the latest version of iTunes... I downloaded the latest version on my mac, but what I do on my phone? I used to be able to sync the two and now I can't even download the photos from my phone on my mac...

    iOS9 on a mobile device requires iTunes 12.3 or higher, which in turn requires a computer running OSX 10.8.5 or higher.  Update of the system only checks the updates for the current version of the system you run, but that itself can be updated.  It may or may not be possible to upgrade your computer to the system requirements. Find your computer on the web site of http://www.everymac.com model and near the bottom of the specification of the system section, he will tell what versions of the operating system, it is able to run. If you can not run a newer system, you will not be able to sync this phone to your current computer. If she can run 10.8.5 or higher, you can either buy a download for Apple OSX 10.8 Mountain Lion code online, or you can try to install the free El Capitan OSX 10.11.  El Capitan can run slower on older machines and require the additional purchase of RAM.  Making a big jump in versions of system is also more likely to affect the old software.

    At el capitan Snow Leopard, it will make my macbook is slow?  - https://discussions.apple.com/thread/7412959

    Mountain Lion 10.8 purchase link United States of America - http://www.apple.com/shop/product/D6377Z/A/os-x-mountain-lion

    Mountain Lion 10.8 purchase link U.K. - http://www.apple.com/uk/shop/product/D6377ZM/A/os-x-mountain-lion

    Course OSX Upgrade General information, including configuration required - http://www.apple.com/osx/how-to-upgrade/

  • Satellite A660-k17: can I remove the two primary partitions used for restoration?

    Hello
    I have 3 questions :) #.

    1. I burned a copy dvd recovery media, on a laptop A660 k17. There are two partitions on the disk that I think are there for the recovery. The first is 1.46 GB and it's for the recovery and another partition hidden 8.29 GB... and I think that the first contains the Recovery Wizard and the whole environment in which we will get through the repair of the system and the hidden disk contains the actuall with windows data, drivers and so on. Can I remove these two? I ask mainly on the first, if it is not necessary for the system to boot or something after that I have to recover the laptop to the factory setting.

    2 and I also want to leave my partitions so that I don't have to partition the whole drive from C 600 GB again. I have a D drive created but there is this response to a topic already in the forum http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=64754&tstart=90
    who says that when I leave the partitions I created myself, that the recovery will be not available. I have a copy on dvd, but only to make sure no kidding something upward.

    3. when I want a clean system without some software which are preloaded on the oem recovery disk... I have to use windows recovery? or it will be the same as the toshiba one?
    Thanks for the reply possible :)
    Beautiful day :)

    > Can I remove the two primary partitions used for restoration?
    First not, but you can remove the Toshiba recovery partition if you created the recovery DVDs. One day, if you want to install the recovery image once again you can use created the recovery disc.

  • Find the difference of pressure between the two transducers using a NI DAQ 6008

    Hello

    First of all, I'm a relatively inexperienced LabVIEW Developer, so my apologies in advance if this message does not have something, or otherwise lacks clarity.

    I try to develop a VI as follows the pressure difference between the 2 EME 3100 pressure sensors (4-20 my), related to two different pressure lines, using a NO-DAQ 6008. I would like for the acquisition of data to read the two transducers, then have him find VI the differential and write this differential in an Excel file.

    The data sheet for these sensors may be found at: http://www.gemssensors.com/Products/Pressure/Pressure-Tranducers/Sputtered-thin-film/~/media/GemsNA/...  It is a 3-wire system, with a voltage between 8 - 24V. I use an external power supply of generic brand to power sensors, which provides a maximum of 24V @ 4A.

    I drifted my physical connection (for the two transducers) this thread http://forums.ni.com/t5/LabVIEW/I-am-having-trouble-Omega-PX4200-Pressure-Transducers-to-where-I/m-p... and am relatively certain of the accuracy of the information. For purposes of signal conditioning, I use a 500 Ohm resistor between the signal of each transducer and the Earth wire.  On the side of software, I use the latest version of LabVIEW (2011) as well as MAX on a Windows 7 64-bit machine.

    In an ideal world, the sampling rate would be as high as possible, but 4 samples per second would suffice for all purposes useful.

    Given this goal, are there any sample of VI (especially for MAX, which I have not yet used) who would be similar/applicable to this project, specifically, regarding setting a sampling frequency, calibration of the transducers or affecting the pins/channels appropriate? All resources would be greatly appreciated.

    Kind regards

    MG Wilkinson

    Measure the voltage between the two resistance (resistance by probe 4-20 MA) using the differential inputs of the x 600.

    When you configure the task, you can read several entries at once, by entering in "Dev_ / AI0:1" in the physical channels and using the "several channels / {unique |}". multiple} samples"polymorphic instance.

    600 x can read 1kS/sec.

    Do maths/conversions on the table, and then simply subtract the two tables.

    Could also take some samples (10-100) at 1 kHz and their average together, give you a smaller rate effective sampling but with less noise.

    A loop of producer-consumer would be good architecture here, let the daqmx reading live in a loop and sends the data via a queue to a 2nd consumer that performs mathematical operations and write to a file.

  • Update Windows using the two direct connection to proxy nd

    Use the two nd direct net connection by proxy, more time via proxy, is there a way I can configure update without changing the settings?

    am on windows 7 Home premium

    Please correct me if wrong, using "netsh winhttp import proxy IE" it says you can update via proxy, passing 'autamatically detected settings' proxy servers, will be here all the problems and errors in its conclusion/search for updates (does not search for updates error codeWindowsUpdate_80072EE2""WindowsUpdate_dt000")?

    Asked me to do this update of proxy (windows security essentials)

    The open command prompt window. [In Vista and Windows 7 you need to open the prompt as Administrator]

    2. type of this syntax: NETSH WINHTTP PROXY DEFINED (Insert here the number and proxy server) and press ENTER.

    Example: NETSH WINHTTP SET PROXY 1.1.1.1:8080
                           OR: NETSH WINHTTP SET MYPROXY .NET PROXY: 8080

    If his point is it normal that windows update as well as the WSE update fails with direct connection?

    happened with me with error msg error codeWindowsUpdate_80072EE2""WindowsUpdate_dt000"

    If the details of my proxy are 192.168.0.1 port 3128, which is the entrance to the command line...

    I had to reset the connection parameters using winhttp reset to retrieve the update in direct connection to the network

    Please give me a good solution with this

    Help us help you: start by reading this post 'sticky '...

    What information to post in the Windows Update forum
    http://social.answers.Microsoft.com/forums/en-us/vistawu/thread/1467f44b-ee27-4F7D-98d7-f1c4b35b3395

    =======================

    You can encounter errors related to connect temporary [e.g. 0x80072EFF 0x80072EFE 0x80072EFD; 0x80072EEF; 0x80072ee20x80072EE7; 0xC80003FA 0X8024402F] when you use Windows Update or Microsoft Update to install updates
    http://support.Microsoft.com/kb/836941

    How to reset the Windows Update components?
    -Online skip the section to APPLY to if Win7; Access KB971058 via Internet Explorer (32-bit) only. Run the difficulty in DEFAULT and AGGRESSIVE modes, then restart [1]
    http://support.Microsoft.com/kb/971058

    ~~~~~~~~~~~~~~~~~~~~~~
    [1] full Disclosure: the difficulty operating in AGGRESSIVE mode will remove your update history but not list the updates installed in Add/Remove Programs (Windows XP) or updates installed (Vista & Win7).

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Windows 7: 64 bit for Windows 07:32 bits (the two Home Premium)

    Because Adobe does not provide support for 64-bit computers, I wonder if I am able to update (?) my 64 bit Windows 7 for 32-bit and there still reverse once more when Adobe catches up? My set of update came with the two discs, and I use them on the same computer, so what is still possible or even legal?

    Why not just go to pages with content in IE8 32 bit Flash?

    See this thread: http://social.answers.microsoft.com/Forums/en-US/vistawu/thread/babaa5f8-ff06-4ea2-aef6-a9416d65f981 ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Cannot move tabs if the TWO Helper tab Multiple Tab Mix more AND is active since Firefox 49 update.

    The tabs can not be rearranged. Operations tab dragging with the mouse, but the remaining space and the tabs do more mix to make room. Arrow placement does not appear. By releasing, the tab appears to the vacant place that it comes.

    Problem when Firefox updated to 49. Even on two different computers with Vista and Windows 7. If I disable tab Mix Plus, or Multiple Tab Handler, drag the tabs normally. (Both were working together before, for years).

    I does no change in settings on computers option. I have not installed the new modules. He might have 49.0.1 when it first 'broken' and is always the same with 49.0.2.

    I never had the shift + click and ctrl-click configured such as recommended; but I also tried and it did not help. (I put them for MTH to control, now, I have them set as recommended with TMP controlling selections).

    Has anyone else using these two extensions encountered this? Should I report it to the author (s)? Or somewhere else? This is my first post, in the corner right/better?

    Thank you very much, Mr KL

    There is a report of "Issues" opened here on this specific issue. https://github.com/piroor/multipletab/issues/139

    And TabMix Plus has a forum of support here: http://tabmixplus.org/forum/ peek into "Problems & Questions" did not show a thread on this problem. https://BitBucket.org/onemen/TabMixPlus/issues Nothing is.

    Make sure that the two extensions are the absolute latest versions of 'Libération'. Multiple Tab Handler 0.8.2016090602 Tab Mix Plus 0.5.0.1

  • 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.

  • Update of the screen, threading and synchronization

    I have a game I developed that uses multiple threads to process. The game does not focus on the user by itself and seems to be accelerating when there are more items on the screen and slows down when there is less. I have four threads in use. Three of them are used to update the main (UI) thread and run continuously; two update a class watch stop custom, and the third simply disabled the screen to force a refresh. All three of the threads use locks objects synchronized; That's why I think it slows down when nothing is on the screen, because they constantly block. I do not have variables that are constantly updated by the thread and read survival gear each iteration; which I was I use locks. I use the IDE 4.7 and the simulator of the storm. Profiling code over a minute 3 period shows that almost 60% of the execution time is during one of the locked rows (block I'm of course). I was wondering what I should use locks because only the UI thread updates one of the three? If so, is there a better way. Code can be provided if necessary.

    BUDOKAI-is that they have a book of text on the famine of lock?

    http://Java.Sun.com/docs/books/tutorial/essential/concurrency/starvelive.html

    [ed, I would also like to make out this seems to be a tight loop so that it also uses time spinning CPU]

    during the liberation that briefly up to 2 locks]

    While (true) {}
    synchronized (runLock) {}
    If {(race)
    synchronized (pauseLock) {}

  • Replace the two drives in a Poweredge T110 II

    Hello

    I am running Windows server 2008 r2 on a Poweredge t110 II server. We had problems with our system crashing a lot lately and it seems to be a problem of hard drive so I replace the two players in our system.

    I watched a previous thread on this-

    http://en.community.Dell.com/support-forums/servers/f/1466/p/19529142/20465311#20465311

    but the Administration of server to manage open, nothing is displayed on the storage tab.

    Can someone help me with this problem?

    You do not use a RAID controller. The disks are connected to the SATA controller on the system board. I see nothing to suggest that these disks are in a RAID array. It seems that these disks are connected like a normal desktop system. If you want to replace the readers simply shut you the system down and physically swap disks on.

  • How do I know if the two tables are the same in the data they contain

    Hello

    How will I know if the two tables are the same in the data they contain?

    Hello

    Please check this thread [compare all columns | http://forums.oracle.com/forums/thread.jspa?messageID=3166309�].

    Kind regards

  • IPhone 7, there will be an adapter jack allowing the two using headphones AND charger?

    IPhone 7, there will be an adapter jack allowing the two using headphones AND charger?

    Hello

    Apple has not yet announced a.

    You can submit your comments and suggestions to Apple here:

    https://www.Apple.com/feedback/iPhone.html

Maybe you are looking for

  • Geolocation service

    Why did I get this message after last ios upgraded still works fine on the iPhone without the last updated

  • 5701na stream 7: Stream 7 &amp; sp72220 Kionix G-Sensor Driver to

    HelloI've exhausted forums and the web looking for a method to activate the feature of merger of Kionix sensors on my two stream 7 tablets.  Everything works very well with 'Win 8.1 with Bing', but the sensors will not successfully install under Win

  • I removed a fake spyware and now I can't get on the internet

    Before you remove the spyware thing, I could get on the internet without any problem.  To remove it, I started in safe mode and ran SuperAntiSpyware.  That I ran it after a start normal and everything was fine except that I can't go on the internet.

  • com surragate not working___

    Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: You have problems with programs Error messages Recent changes to your computer What you have already tried to solve the problem

  • Required LIBS in the .pro using QAccelerometer, QAccelerometerReading file

    Hello I want to use the class QAccelerometer and QAccelerometerReading in my application. So, what libraries to include for them. And where I will get the libs list to include for the use of these classes. Kind regards Sanjeev