panels and multithreading - what features can I call from another thread.

I am writing a program (Windows XP, LabWindows/CVI 2010) that has several threads. The main thread generates and manages most of the panels, but not all. Is there a list of what control panel functions are thread-safe and which are not? Reading the help file and the different positions, the functions of set value are safe; game-attribute functions are NOT. (I found that calling (SetPanelAttribute) with ATTR_TITLE will be locked permanently a program!). What about calliing a command callback function? (Via the CallCntrlCallback() function). It seems to work very well so far, but I can't find anything definitive.

I do a lot of multi-thread applications, so I have a few ideas for you.  Unfortunately, I have not tried to do many of the changes of attributes specific threads lower panel.

I'm very careful about how I handle the wire "solidity", dealing with the variables in an asynchronous way, as much as possible, to avoid the use of blocking and incorrect values of the variables.

But there are certainly many things simply cannot make you the son of the daughter.  Things like question popups and launch other threads cannot be done simply.  As long as you understand that the best place to do something is in the main thread, and then a girl thread can use PostDeferredCall (...), do something in the main thread

In the thread of your daughter, you can insert this call:

PostDeferredCall (launchNewThread, 0);

And then this call performs this function in the main thread:
void CVICALLBACK launchNewThread(void *callbackData)

{
CmtScheduleThreadPoolFunction (threadPoolHandle, NewThread, NULL, NULL);
}

Or you can insert calls from parameter of the attribute panel inside the function above, I suppose, to safely run in the main thread.

Hoe, that helps...

-Gary

Tags: NI Software

Similar Questions

  • Why is what I can't call anyone on this site!

    Why is what I can't call anyone on this site! I have no frikin all this need! * I NEED A REAL PERSON!

    Is there a particular issue that you are experiencing or the error message you see?

    Having issues of membership or software?

    Please let us know what software you are using and what difficulty you encounter so that we can help you.

    If you need to contact our support staff, assistance, please visit:

    FAQ: How to contact Adobe for support?

  • MenuItems run() method that is called from the thread eventdispatching?

    Hello

    is it? I know that MenuItem itself extends thread, but I wonder why this method is called run() and finally and above all it would'nt be worse if this method would be called from a Thread.

    THX

    In fact the menu items are run on the thread of the event. You can see this by creating a menu item long-term. The menu will not close and will not refresh the screen.

  • Could not get Outlook Express to send a copy to my server, so I can access it from another computer

    I can not Outlook Express to send a copy of my e-mail messages to my server (Charter.net) so I can access it from another computer.  I tried to check the block that says "Send copy to the server", but that did not work.  Any suggestions?  I'm not a true computer person so that the answers should be very details.  Thank you.

    The messages on your computer now, you would have to back to yourself, and then they would be on the server.  For the future, go to tools | Accounts | Mail | Properties | Advanced and check the leave a copy of messages on the server.  Do it with another machine in order to get the messages on both machines.  Then also set one of them to delete messages from the server after a few days, so that they accumulate and fill the mailbox you.

    Steve

  • trying to share a printer, so I can access it from another computer on my network, it seems to cross but the shared icon does not appear

    Original title: sharing printer problems!

    I am trying to share a printer, so I can access it from another computer on my network, it sems to cross, but the shared icon does not appear? Why is this?

    I'm on windows xp professional

    Hi Pazza1995,
     
     
    Follow the steps listed in the articles below and check if it helps to fix the problem:
     
     
  • How can I unsubscribe from this thread

    How can I unsubscribe from a thread

    Deric

    Hello Grandpa,

    In "unsubscribe", I assume you mean that you have opted for emails to you will be sent when someone relies on a thread? If this is the case open your profile and click the notifications identify the thread you are interested in and press the "stop messages" link on the right side of the wire. This will stop the sent emails.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

  • I have subscribed in CC photoshop on my desktop, you can use it from another machine (laptop)?

    I have subscribed in CC photoshop on my desktop, you can use it from another machine (laptop)?

    Yes, you can activate subscription creative cloud on both machines however, you cannot use both machines at the same time, check point 1.1: http://wwwimages.adobe.com/content/dam/Adobe/en/legal/servicetou/Software_Terms-en_US-2015 0407_2200.pdf .

  • Determine what tiara to be called from an external command if we have different versions running

    Hello

    How to manually set which version of DIAdem must be called from an external command. Ongoing calls is activation diadem 11.1 where I need to be called 10.2.

    concerning

    S

    Hi dragnov.

    You are on the right track.  General behavior is that the latest version launched manually will be version released via an order ActiveX call DIAdem.ToCommand or DIAdem.ToDataSheet.  This information is indeed recorded in the DIAdem of the Windows registry section, and you can manually or programmatically change this registry entry before calling DIAdem via an ActiveX control.  I don't remember the name of the registry key on the top of my head, but it sounds like your last post you are already staring.

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • WHAT APPLICATIONS CAN BE DEVELOPED FROM SQL SERVER 2012

    I need to know what applications can be developed using SQL SERVER 2012.

    Hi, Chris,.

    This is an overview of SQL Server 2012

    http://www.Microsoft.com/sqlserver/en/us/product-info/overview-capabilities.aspx

    SQL Server 2012 application development

    http://social.technet.Microsoft.com/wiki/contents/articles/6982.SQL-Server-2012-Developer-Training-Kit-BOM-en-us.aspx#Module_5_SQL_Server_2012_Application_Development

    Post your query on TechNet Forum to get help

    http://TechNet.Microsoft.com/en-us/SQLServer/ff898410.aspx

  • Can I find and replace an object? And I can copy styles from another file InDesign?

    Hi all

    I hope someone has a solution to these two...:

    First, I have a line object between two text frame, and I want to change the thickness and color, no problem, it's

    the problem is I have 100 of them and now I'm a one, is it all find and replace for an object?

    Secondly, is it possible to copy a style from another file InDesign without synchronization of all styles in a book file?

    I'll be very grateful for an answer!

    Thank you

    Vraja

    In the find and Replace dialog box, there is a tab object. You can find your line by its attributes and change. I suggest the setting up and style object and replace all your lines of this style. In this way, the next time you need to change them, you can change the style.

    Regarding the copy of a style of an InDesign document to another. You can just copy something to the style and paste it into the document you want to move to.  (This will not work if the style of the same name exists in the file you are pasting to. In this case, your stuck item would take on the attributes already defined in the new file).

  • 3D toolbar commands can be called from Javascript?

    I can call "A full Page" using acrobat toolbar ' this.zoomType = zoomtype.fitP; Is it possible to do the same with the 3D tools? I would like to have javascript call 'Zoom to Part' in the 3D toolbar.

    Thanks in advance!

    No, sorry. There is no script access to the internal functions that are called from the 3D toolbar buttons or the context menu in the model tree.

  • Why almost all javafx methods must be called from the thread of the application?

    I have a pretty big 3D scene that is refreshed every few seconds.

    It takes a while to update the scene, and I wanted to do it in a background thread.

    Problem is that almost every approach I take requires the application-fx thread.

    Now, I understand that change the UI itself must be called in the application thread, so I tried a different approach:

    Create a new group, add all the nodes (which takes the greatest amount of time) and update the component root of the view with the new group.

    I assumed that only the last party required the application thread, but alas this was not the case.

    group.getChildren () .add also requires that the thread of the application. Why?

    node.setLayoutX () also requires that the thread of the application. Why?

    It is a new set of nodes that are not visible and groups yet, so why can't do this in a background thread?

    The reasons of principle (I think) that JavaFX is mainly a single toolbox threaded are described in:

    https://weblogs.Java.net/blog/2004/10/19/multithreaded-toolkits-failed-dream

    That said, if you manipulate objects that are not part of an active scene, then it should work.  The dream that failed has what to do with the components who participate actively in the molten, interactive GUI.  If you're interacting with only the components out of the screen, then it (should be) without issue.

    Please, create and post an example minimum, executable that replicates the question.

    (Please ensure that the example is minimal and executable).

    In addition, what is the cause as your application "takes some time to update the scene?  Computers are today quite incredibly fast.  Of course, there are valid reasons for some things take time, I wonder what these are in your case.  What is the time?  If your executable example can include something reasonably representative of what you're done which shows something that will take "some time", would be great.

    What you have described so far, I feel that, even if there is no problems with threads, your proposed approach would not fix your performance problem.

  • ERROR, called from the thread NON-INTERFACE QThread

    I am trying to load an image using QtConcurrent:map at the same time and I received this error.

    WARNING: ApplicationPrivate::context: ERROR called NON-INTERFACE QThread thread (0xf9ff68, name = "thread (pooled)" ")
    Fatal: ApplicationPrivate::context: method called from the UI thread

    I simplified the code as follows:

    imagescaler::queuescaling{
    ..    mimageScaling = new QFutureWatcher(this);
    mimageScaling->setFuture(QtConcurrent::mapped(mImageList, scaledImage));
    ..
    }
    
    Image scaledImage(QString file_name) {
       QImage qImage;
       bb::ImageData imageData(bb::PixelFormat::RGBA_Premultiplied, qImage.width(),
      qImage.height());  // causes error
      return imageData;
    }
    

    Anyone know what the problem is or how to work around?

    Thanks for point out the bb:ImageData.  Never noticed the incompatibility.  Image converts ImageData to initialization, so it does not create an error.  However, if I return an ImageData rather than the Image it does not crash.  I then simply convert ImageData of Image in the UI thread and it works very well.

    I'm curious to know why I can return a blank image and I can return an imageData, but I can't go back an Image that's been converted from ImageData.  Do not understand what can or cannot be done outside the UI thread.

  • Passwords can be imported from another browser like PaleMoon

    I have to many passwords stored in my browser PaleMoon. others that the copy of each individual password, how can I import all passwords at once to my Firefox browser?

    Not sure if it works with palemoon, but see Import Bookmarks and data from another browser.

    If this does not work, you can transfer the file 'Key3db' of the old profile in Palemoon, to the new in Firefox.

  • You can disable windows from another computer

    My sons laptop got stolen, if he can disable windows XP from another computer, so when the computer is turned on, no one can use the operating system

    My sons laptop got stolen, if he can disable windows XP from another computer, so when the computer is turned on, no one can use the operating system

    The short answer is no other post recommend that you ask the laptop on your insurance. It of a good idea to install prey or other protection software against theft on portable computers that will allow you to lock the remote computer and follow where it was stolen. However, even these measures will not help if the thief erases the hard drive and re - install Windows.

Maybe you are looking for

  • Camileo S10 - record 16: 9 FULL HD

    I have the same problem with a friend * rodarko * ([m-169634]). I saw that his thread, but no one since now you have a solution. I will try to describe my exact problem. When I record in 16:9 full HD, everything looks ok. But when I try to play on my

  • Where are the UART pins on sbRIO-9627?

    I'm new to the SingleBoard RIO and I need 5 UARTS, but I can't find RX TX PIN. Where the pins are located? Data sheet: http://www.ni.com/pdf/manuals/375466a.pdf Product page: http://www.ni.com/white-paper/52801/en/ RS232Edge (Total) = 2 (6)

  • MAX with replication DAQ cards

    Hello Hope someone could shed some light on this Its a long time since I've used Labview & MAX and am a little rusty right now. I'm trying to upgrade an old data acquisition system to a newer version. This is because originally one full working backu

  • PROBLEM SCANNING HP LASERJET 1005

    I INSTALLED A NEW HP LJ 1005. AFTER SCANNING BY COMPUTER, I GET RED LIGHT IN THE SCANNED IMAGE. I DID COMPLAIN TO HP, BUT NOBODY DON'T SE TILLDATE. PLEASE HELP ME TO SOLVE MY PROBLEM.

  • Why does my screen display horizontally?

    Hello My young niece somehow pressed some keys on the keyboard and now my screen displays horizonatlly instead of vertically. Get a stiff neck to have totilt my head sideways! Help, please