Labview stopped executing mutli-threaded

Hi I have a serious problem.
I have created a windows keyboard hook DLL and I call this DLL from Labview. Now in labview there are 2 threads (2 completely separated while loops) one for ControlPanel and one for processing data.
Now DLL works with events, so one of the DLL calls freezes the processing thread until there is data available.
Now the ControlPanel thread does what it does and it doesn't care if the other thread is frozen.
So until today everything worked perfectly. Now I'm not sure but it looks that since I've build an application (exe) the vi runs as single threaded VI. Now this means that as soon as the processing 'thread' is stopped the whole application really stops.
Now does somebody knows how to force Labview to use multiple threads? As I don't want to write the whole VI again. And more I would really like to know this.
Peace
Waldemar
Attachments:
example.zip ‏112 KB

Found the answer -> in Call Library Function window the function must be set to reentrant so that the Labview knows the function can be run in any thread.
Peace
Waldemar

Similar Messages

  • Stop the running Thread

    Hi
    i am calling the thread .in the midlle of running thread i have to stop the thread .please help me .
    my senario like . I am calling the scripts . i am wating certain period to complete the script exection . if the scripts are not available its still wating for a long time . so i am using the thread to execute the scripts and (main thread )checking each duration is completed or not . if the duration completed i am stoping the thread with Thread.Stop() method . but the thread still is alive . next time when i call Thread.Start() its throwing "java.lang.IllegalThreadStateException".
    please help me this .
    Thanks in advance
    public class TestCaseScriptProcessor extends Thread {
    public String execute(){
    TestCaseScriptProcessor caseScriptProcessor = new TestCaseScriptProcessor();
    caseScriptProcessor .start();// second time throwing java.lang.IllegalThreadStateException.
    while (!isExpired) {
    caseScriptProcessor.stop();
    public void run() {
    Edited by: 849614 on Jan 17, 2013 6:17 AM
    Edited by: 849614 on Jan 17, 2013 6:22 AM

    What exactly are you trying to do? Calling Thread.stop( ) is inherently a bad idea (see the Javadocs).
    You are getting a IllegalStateException because Thread.stop( ) kills the thread, you would need to create a new thread to resume execution.
    If what you are trying to do is pause execution, you probably want to redesign your thread's tasks into smaller chunks that can be launched separately. Alternatively, have the thread check it's interrupted state and if a flag was set block on a monitor until you want it to resume execution.

  • Unable to Run C Program using Xcode "Stop Executable"

    Hi All
    Have been using the Terminal to compile programs built through Xcode but now want to use Xcode itself. Everytime I press build and go it builds successfully but won't run. I found a tutorial that mentioned if you are using Xcode 3.0 (I am) you can't use build and run, for output, you have to go to run and then push console.Ok that works. I then found someone with the same issue as mine everytime you want to build and run it appears with another window saying "Stop Executable"They were told to make sure they were building the .c file in a project and not building it from a text editor and then importing. I always build new projects.
    I want to interact with the program not just see its output? so my question is can I interact with programs i.e. User can enter data or strings or, do I have to build an interface to do this through Xcode. I Also forgotten to mention I found information through the forum that said to go to First Aid through utilities and repair file permissions, this has been done but still does not work. Many thanks for your time and as you can probably tell I am new to Xcode.

    To run your command-line program in Xcode, open the debugger console by choosing Run > Console. Run your program by choosing Run > Run or Build > Build and Run. You'll have to build and run if you haven't compiled the program before. Your program will run, and you will see output in the console. You interact with the program from the console.
    If you're not able to enter input in the console, choose Run > Sync with Debugger. If doing that doesn't work, you can run your program in the Terminal application by double-clicking the program from the Finder. It's less convenient than running it in Xcode, but you'll at least be able to run the program and interact with it.

  • Stop an OSGi thread

    Hi everyone!
    I am programming a OSGi bundle using Eclipse. The problem is that I don't know how to use the stop method in the Activator class so my program does never stop and I have to stop it by hand. For example:
    public void start(BundleContext context) throws Exception {
          System.out.println("Starting bundle"); }
    public void stop(BundleContext context) throws Exception {
         }The console shows the Starting bundle message but instead of stopping the program after doing the only thing it must do, it does not stop. What should I write in the stop thread so that the program after showing the message stops?
    Thanks in advance!

    What exactly are you trying to do? Calling Thread.stop( ) is inherently a bad idea (see the Javadocs).
    You are getting a IllegalStateException because Thread.stop( ) kills the thread, you would need to create a new thread to resume execution.
    If what you are trying to do is pause execution, you probably want to redesign your thread's tasks into smaller chunks that can be launched separately. Alternatively, have the thread check it's interrupted state and if a flag was set block on a monitor until you want it to resume execution.

  • Stop executing work item

    Hi All,
    When the work item is sent to substitute we need to check the level of substitute. if substitute is lower
    level than original approver then substitute  shouldn't  execute the work item instead it should be forward to higher/same level of original approver. Please help me out with your suggestions.
    Thanks,
    Suman

    Hello,
    "but not able to stop executing the work item from deleted substitutee and his inbox is also not refershing immediately, if I close thebusiness work place and re open it again, I am not seeing the forwarded work item. This is working correctly but I want the work item to be deleted from substitute's inbox when I forward the work item to another substitute. Please help me with your suggestions."
    This is just a problem with refreshing the inbox. It doesn't really matter because he won't be able to execute the workitem. The same thing would happen if he and someone else received a workitem and the other person executed it first. It's not a problem.
    Is this UWL or SBWP?
    regards
    Rick Bakker
    hanabi technology

  • Why do we need to call start() to execute a thread.

    hi,
    Why do we need to call thread.start() to execute a thread. why not just calling run().
    Vjoy

    hi,
    Why do we need to call thread.start() to execute a
    thread. why not just calling run().
    Because, start() does two things.
    - start a new thread of execution and then
    - call the run method....and calling run does NOT start a new thread of execution. It's just a plain old regular method.

  • How to stop executing a piece of code after displaying the error message?

    Hi All
    I'm new to ADF, I am doing validation in java class. Like when i click the button, the control goes to a particular method, where i have written the below statements
    public void fetchValues(ActionEvent actionEvent){
    String firstName = getFirstName() == null ? "" : getFirstName();
    String secondName = getSecondName() == null ? "" : getSecondName();
    if(firstName.equals("") && secondName.equals(""){
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Please enter the values");
    context.addMessage(null, msg);
    System.out.println("Exited"); // Even if validation fails, this line is being executed. Could anyone tell me how to stop executing this line if validation fails ?
    Regards
    Venkat

    Just add a return; at the point you want to stop execution.
    public void fetchValues(ActionEvent actionEvent){
    String firstName = getFirstName() == null ? "" : getFirstName();
    String secondName = getSecondName() == null ? "" : getSecondName();
    if(firstName.equals("") && secondName.equals(""){
    FacesContext context = FacesContext.getCurrentInstance();
    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, null, "Please enter the values");
    context.addMessage(null, msg);
    return;
    // UNREACHABLE System.out.println("Exited"); // Even if validation fails, this line is being executed. Could anyone tell me how to stop executing this line if validation fails ?
    }Timo

  • Matlab script of labview keeps executing multiple times,

    i have some code for serial communication in matlab , i want to use it in labview for easier and better gui design. for that i have used matlab script node in labview. it seems that labview keep executing the matlab script but i want labview to execute it only once.is there any way to do it?
    Solved!
    Go to Solution.

    i am attaching a vi file. this vi sends 'h' to the com1 continuously but i waant it to send only once.
    Attachments:
    forum.vi ‏7 KB

  • Cannot stop memory monitor thread

    Hi All,
    I am getting the following error intermittently in a dataflow which has degree of parallelism = 8.
    22943 0 SYS-170111 27/11/2009 12:22:05 |SubDataflow DF_Conform_ISI_Person_Match_Prep_1_9
    22943 0 SYS-170111 27/11/2009 12:22:05 Cannot stop memory monitor thread: <RWThreadImp::terminate - No thread is active within the runnable>
    Any ideas as to the cause ?
    Thanks,
    Eric Jones.

    We are having the same issue.
    According to ADAPT00890818, this issue should be resolved in 12.0.0. We are currently running with version 12.2.2.3.
    Please advice.

  • I have several times tried to stop following a thread in the PDF's forum about security issues and i still keep getting flooded with emails from this thread. I used the action within the thread that says stop following but appears to have no effect I stil

    I have several times tried to stop following a thread in the PDF's forum about security issues and i still keep getting flooded with  emails from this thread. I used the action within the thread that says stop following but appears to have no effect I still keep  getting from 5 to 20 emails daily. Please help!!!!!!!

    This may be helpful: How do I disable email notifications?

  • EA21 feature "Whenever SQL Error Stop Executing Script User Preference"

    Has anyone come across the feature "Whenever SQL Error Stop Executing Script User Preference" in the new 2.1 release. Doesn't seem to be among the items on the new feature list. This has always been a stumbling block for us in terms of adoption.
    The OTN feature request says scheduled for 2.1.
    Thanks

    Well yes, like that you can give up on sqldev all together too, as we got sqlplus... duh.
    Seriously, we were referring to the request accepted for 2.1.
    Thanks for the tip anyway, for sure it will benefit users that don't know it.
    K.

  • Stop executing query once the result is more than n rows

    Hi,
    Is it possible to stop executing a query for a View Object once the result hits n rows?
    Any pointers are appreciated
    Thank you for your time.
    Edited by: user594688 on Sep 12, 2008 8:21 AM

    Rownum is indeed the attribute. If you really want to stop the query after the first n rows, that's pretty much the only way to do it, to my knowledge.
    If you're primarily worried about database load, but want to give the user the option to query more rows if and when they really need them, check out the following in the Fusion Dev Guide for Forms/4GL developers:
    37.1.5 Efficiently Scrolling Through Large Result Sets Using Range Paging
    (Note that this is not the same as simply using a range size, which ADF does by default--the range size simply limits the number of rows displayed ot the user, not the number queried. It's also not the same as setting the JDBC Fetch size, which limits the number of rows loaded into the cache, and therefore onto the app server, at one time, but again not the actual query result.)

  • SYS-170111 - Cannot stop memory monitor thread: RWThreadImp::terminate -

    Hi Experts,
                  WE have this warning in pretty much every job in production. But the warnings are not specific to certain jobs they might occur one day and not the other day.
    Cannot stop memory monitor thread: <RWThreadImp::terminate - No thread is active within the runnable>.
    I know looking at the release notes this issue was fixed in 3.0 (12.0.0), we are using 3.2 (12.2.0) and having the same issues. The job server is on a linux 64 bit. I have not seen this issue in any of our windows job server. Is this bug specific to linux or is there a resolution for this.
    Appreciate your help in advance.
    Thanks
    AJ
    Edited by: alangilbi on Sep 28, 2011 5:17 PM

    Hi, AJ.
    As can be seen in the KBA 1455412 this is a known behavior.
    "As a result of fixing the problem identified in ADAPT 00890818 in release 12.0.0.0, this message is displayed by design. If there is really a problem in stopping the memory monitor thread an exception is thrown and an error message is logged.
    Background:
    In the memory monitor's shutdown logic, once it tells the monitor thread to shutdown it waits for the thread to terminate but only for 10 seconds. It could be that at this same time the wait expired when the thread actually terminates. So when this happens in the shutdown logic we force terminate the thread. Since there is no active thread anymore the terminate call throws an exception and then we catch it and then throws the error for the job."
    You can just ignore this warning.
    Leo.

  • Is ThreadPoolExecutor.execute(Runnable) thread-safe?

    Is ThreadPoolExecutor.execute(Runnable) thread-safe, i.e. is it safe
    to invoke this method from multiple threads without making any
    special arrangements to ensure that not more than one thread is
    in the execute() method of the ThreadPoolExecutor object at the same time
    (such as synchronizing on the ThreadPoolExecutor object)?
    I can find nothing in the Java 6 documentation to say it is thread-safe
    (Executor, ExecutorService, ThreadPoolExecutor and package documentation).
    Note that I am not asking anything about the actual execution of the Runnables.
    I am asking about the act of inserting the Runnables into the thread pool.

    Thanks to everyone who replied.
    The three example implementations in the interface documentation for Executor, including the one where the Runnable is executed by the invoking thread, are thread-safe but only the last one needs to do anything special (namely make the execute(...) method synchronized) to be thread-safe. It is not clear whether the thread-safety of the first two implementations is conscious or accidental. Even if conscious that would not imply that it is necessary.
    I think the published documentation (unless I've missed something) is deficient. The method would not be useless if not thread-safe. I don't think thread-safety is a safe default assumption. I think a package that supports concurrent programming should be clear on where it is thread-safe.
    I've had a quick look at the source code in the 1.6 JDK implementation. It makes a serious and plausible effort to be thread-safe. It was written by Doug Lea.
    I'm going to assume the method is thread-safe, based on looking at the source code.

  • Wouldn't this code stop executing if there is an error?

    I created a script to drop tables like below.
    DECLARE
        v_sql VARCHAR2(4000);
    BEGIN
         FOR obj IN (select table_name from user_tables)
      LOOP
          v_sql := 'drop table  ' || obj.tablename';
          dbms_output.put_line(v_sql);
       EXECUTE IMMEDIATE v_sql;
        END LOOP;
      END;But, if oracle encounters an error, say an error like
    ORA-02449: unique/primary keys in table referenced by foreign keysThis code will come out of the loop and stop executing. Right?

    After getting the typo's out of your example:
    - ORA-01756: quoted string not properly terminated
    - component 'TABLENAME' must be declared
    The answer to your question is: Right, but you could have tested this easily yourself ofcourse.
    SQL> select constraint_name, constraint_type, table_name from all_constraints where table_name in ('TABLE1', 'TABLE2');
    CONSTRAINT_NAME                C TABLE_NAME
    SYS_C0020788                   P TABLE1
    C1                             R TABLE1
    SYS_C0020789                   P TABLE2
    C2                             R TABLE2
    4 rows selected.
    Elapsed: 00:00:00.21
    SQL> DECLARE
      2      v_sql VARCHAR2(4000);
      3   BEGIN
      4       FOR obj IN (select table_name from user_tables)
      5  .
    SQL> DECLARE
      2      v_sql VARCHAR2(4000);
      3   BEGIN
      4       FOR obj IN (select table_name from user_tables where table_name in  ('TABLE1', 'TABLE2'))
      5  LOOP
      6        v_sql := 'drop table  ' || obj.tablename';
      7        dbms_output.put_line(v_sql);
      8     EXECUTE IMMEDIATE v_sql;
      9      END LOOP;
    10    END;
    11  /
    ERROR:
    ORA-01756: quoted string not properly terminated
    Elapsed: 00:00:00.11
    SQL> DECLARE
      2      v_sql VARCHAR2(4000);
      3   BEGIN
      4       FOR obj IN (select table_name from user_tables where table_name in  ('TABLE1', 'TABLE2'))
      5  LOOP
      6     v_sql := 'drop table  ' || obj.tablename;
      7        dbms_output.put_line(v_sql);
      8     EXECUTE IMMEDIATE v_sql;
      9      END LOOP;
    10    END;
    11  /
       v_sql := 'drop table  ' || obj.tablename;
    ERROR at line 6:
    ORA-06550: line 6, column 35:
    PLS-00302: component 'TABLENAME' must be declared
    ORA-06550: line 6, column 4:
    PL/SQL: Statement ignored
    Elapsed: 00:00:00.07
    SQL>  DECLARE
      2        v_sql VARCHAR2(4000);
      3     BEGIN
      4         FOR obj IN (select table_name from user_tables where table_name in  ('TABLE1', 'TABLE2'))
      5    LOOP
      6          v_sql := 'drop table  ' || obj.table_name;
      7         dbms_output.put_line(v_sql);
      8      EXECUTE IMMEDIATE v_sql;
      9       END LOOP;
    10     END;
    11  /
    drop table  TABLE2
    DECLARE
    ERROR at line 1:
    ORA-02449: unique/primary keys in table referenced by foreign keys
    ORA-06512: at line 8
    Elapsed: 00:00:00.23
    SQL> desc table1
    Name                                                                  
    COL1                                                                  
    COL2                                                                  
    SQL> desc table2
    Name                                                                  
    COL1                                                                  
    COL2                                                                  

Maybe you are looking for

  • Problem in creating EJB and WebService using complex class structure

    Hi All, My requirement is like : I have a class with very complex structure. I have also used external .jars. Now when I have created an EJB with a method's return parameter as above class. But when I am creating a Webservice, it doesnot allow me to

  • Extra space adding during spool data into text file

    I'm using sql developer to query oracle tables. I can export data using GUI of sql developer, but I wish to use spool query to export the data. Using below query, I was able to export the data to specified location, but my final text file consist of

  • -110 Error in Mail

    OK, I'm setting someone up with a mail account, they have all the details correct but when the try to collect from the pop box they get a -110 error. I've tried all the same settings on my mac and it works fine, I'm on a G5 and they are using a power

  • [Solved] ar9170usb loaded but WIFI not working

    Hi, I bought today my new USB WIFI adapter (TP-Link TL-WN822N), but its not working. ar9170usb module is loaded correctly, but wlan0 doesnt. dmesg| grep ar9170usb [ 3.007214] usbcore: registered new interface driver ar9170usb lsmod | grep ar9170usb a

  • Fade In/Out not working

    Hi Applying Fade Ins or Outs seemed to have stopped working. Using either the crossfade tool or specifying them in the Inspector, they appear graphically correct, but audio-wise, no fade. Crossfading between regions is working fine. Using ordinary un