Do I need to use a semaphore when reading/writing a functional global from reentrant VIs?

I have a program that spawns multiple reentrant VIs running simultaneously.  These VIs write their status to a functional global.  The VI that monitors them periodically polls this global to check out how they're doing and takes action based on their collective status.  (BTW, I'll mention that this monitoring VI is NOT the parent that spawned the reentrants, just in case this might affect memory management as it pertains to my question.)
Anyway, 90% of the time, stuff goes off without a hitch.  However, once in a while the whole thing hangs.  I'm wondering if there's any chance that I've overlooked something and that some kind of collision is occurring at the global.  If that's the case, then should I be setting a semaphore for the global read/writes?
And, if this is a problem, then there is something deep about functional globals that I don't yet understand.  My notion of them is that they should negate the need for a semaphore, since there is only one global instance, which cannot be simultaneously called by the various reentrants.  Indeed, this is arguably THE WHOLE POINT about functional globals, is it not?  Or am I missing something?
Thanks,
Nick 
"You keep using that word. I do not think it means what you think it means." - Inigo Montoya

Thanks Uwe,
This is a good hunch.  However, functional globals typically run at "subroutine" priority.  With this priority, it is not possible to select a specific execution system; it is always "same as caller."
I will try your suggestion by switching to "time-critical" priority.  However, I do not know if this could lead to a different set of issues (non-determinism?).  It will probably take a little while to hear back from my guys on whether this makes a difference or not, because the error is sporadic, and sometimes doesn't come along for quite a while.
While probing all of this, I looked at the execution settings for my reentrant VI.  It has standard settings: "normal" priority, running in the "same as caller" execution system.  My impression has always been that LV creates the clones with unique names.  This allows the clones to be in the same execution system with no problem, and the fact that the execution dialog allows me to choose "same as caller" for a reentrant VI supports this assertion.  This is logical, since there could potentially be many more clones than available execution systems.  "Preallocate clone for each instance" is selected, which is what I want, I think, though I don't know if it matters in my application.
In summary, I am trying out your suggestion, but with skepticism.  Any other suggestions from anyone out there?  Any misunderstandings on my part that need clarification?
Thanks,
Nick 
"You keep using that word. I do not think it means what you think it means." - Inigo Montoya

Similar Messages

  • I want to buy iphone 6 noncontract in america it is with t-mobile from apple would this be unlocked as i need to use nigerian sim when i come back to nigeria

    i want to buy iphone 6 noncontract in america it is with t-mobile from apple would this be unlocked as i need to use nigerian sim when i come back to nigeria

    Read the forums for all the differing opinions probably not yet available as unlocked
    and Contract Free is NOT unlocked
    It will not work on LTE/4G and there will be no warranty outside the US ,it is NOT international

  • Need Help using OpenText Methord to read a CSV formmated file into an excel spreadsheet

    I am trying to load a csv into excel with formated columns, the 4th column is alphanumeric but after loading the values in the four column the column is define as general and it drops the leading zeros on values that have the leading zeros
    i can not use a sub string to preload the zeros due to varing length and format the csv file has them correctly anybody have a solution on how to correct?
    the VBScript looks like;
    Set objExcel = CreateObject("Excel.application")
    Const xlDelimited  = 1
    Const xlGeneralFormat = 1
    Const xlTextFormat = 2
    oFile = "I:/temp/MEMAPRPT3P 2014-08-04.csv"
    wfile = "I:/temp/MEMAPRPT3P 2014-08-04"
    filetime = "_2015_01_20_10_28_00"
    tagname = "sample"
    objExcel.application.visible=false
    objExcel.application.displayalerts=false
    objExcel.Workbooks.OpenText Filename, , 1, 1, , False, False, False, True, False, , ,Array(Array(1, xlTextFormat), Array(2, xlTextFormat), Array(3, xlTextFormat), Array(4, xlTextFormat))
    Set objExcelBook = objExcel.ActiveWorkBook
    Saveasfile = trim(wfile) & trim(filetime) & ".xlsx"
    objExcelBook.SaveAs Saveasfile, 51
    objExcel.Application.Quit
    objExcel.Quit  
    Set objExcel = Nothing
    Set objExcelBook = Nothing
    The csv data look like"HEDA","Fred","Detroat","0598""SDRA","Steve","Jericho","Q23456""ADAS","Tim","Home","000892356"

    i can not use a sub string to preload the zeros due to varing length and format the csv file has them correctly anybody have a solution on how to correct?
    The issue is that the cell isn't formatted as text, that's a bug within OpenText.
    You can use a query table instead and emulate OpenText. The benefit is that you can import the data in the current file.
    Andreas.
    Sub Test()
    Dim FName As String
    Dim Q As QueryTable
    FName = "C:\Users\Killer\Documents\test.csv"
    'Add a new sheet after the current sheet
    Worksheets.Add After:=Sheets(ActiveSheet.Index)
    'Add a query table
    Set Q = ActiveSheet.QueryTables.Add( _
    Connection:="TEXT;" & FName, Destination:=Range("$A$1"))
    With Q
    'Setup the importsettings
    .TextFileCommaDelimiter = True
    .TextFileTextQualifier = xlTextQualifierDoubleQuote
    .TextFileColumnDataTypes = Array(xlTextFormat, xlTextFormat, xlTextFormat, xlTextFormat)
    'Import the data
    .Refresh BackgroundQuery:=False
    'Delete the query table (we don't need a permanent link to the file)
    .Delete
    End With
    End Sub

  • Why does BC show that I need to buy live hosting when I should get 5 free from CC?

    I bought CC earlier today and BC still shows that I need to buy live hosting. Why?

    Hey there,
    Reach out to BC support on this. It probably is to do with if you tried to use Adobe BC before with a different Adobe ID etc. There are some FAQ's in the FAQ section on this I believe. But if you reach out to support I am sure they can fix that up for you.

  • Error -36 when reading/writing with firewire drives (400 & 800)

    This is only happening when I connect the drives to my G5, but the drives work fine on my MacBook Pro. I first thought I had a problem with my drives, but then when they worked on my laptop I figured it must be a problem with my G5. One of the drives is a smartdisk firelite drive connected via firewire to the front of my G5, the other is a G-Drive connected via FW 800 in the back of my machine.
    Any ideas of what I need to do on my G5 to fix this issue?
    Thanks!

    Hi-
    The error is an I/O error. One possible cause is low power on the firewire bus, or, the drives require more power than is available. Placing a powered hub between the G5 and the drive may be the solution.

  • Can I use I pad to read word and pdf files from my laptop how to transfer these files??, can I use I pad to read word and pdf files from my laptop how to transfer these files??

    I recently had my first ipad , first generation, I bought it to read all my books and documents on the laptop either in word or in pdf format >> now I feel lost, I can't even transfer my files ofrom the laotop to the ipad.I don't know what to do>>help me please

    Google for "import documents to ipad" to find lots of articles on this topic.

  • When I open a new windows from my current tab background turns black. Can this be disabled?

    I use Remedy and when I open a new windows from my current one my background turns black. This started when I moved to the new update. Is there anyway to disable this?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I am trying to use an education program that needs Java applets to install and use and it will not use Safari. When I download IE from the web it will not install. How can I get a browser that will work on my MacAir for travel use of this program?

    I am trying to use and education program that needs Java applets and it will not run on Safari. IE will not install from the web. How do I get a browser that will work to install so I can use this program when I travel.

    Try using FireFox. IE will only run on a Mac if you run Windows on the Mac.
    Windows on Intel Macs
    There are presently several alternatives for running Windows on Intel Macs.
    Install the Apple Boot Camp software.  Purchase Windows 7 or Windows 8.  Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows.  Boot Camp enables you to boot the computer into OS X or Windows.
    Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  Parallels is software virtualization that enables running Windows concurrently with OS X.
    VM Fusion and Windows XP, Vista Business, Vista Ultimate, or Windows 7.  VM Fusion is software virtualization that enables running Windows concurrently with OS X.
    CrossOver which enables running many Windows applications without having to install Windows.  The Windows applications can run concurrently with OS X.
    VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris.  It is not as fully developed for the Mac as Parallels and VM Fusion.
    Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc.  There are performance differences between dual-boot systems and virtualization.  The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. A more recent comparison of Parallels, VM Fusion, and Virtual Box is found at Virtualization Benchmarks- Parallels 10 vs. Fusion 7 vs. VirtualBox. Boot Camp is only available with Leopard and later. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
    You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive.

  • I am trying to use powerpoint but when I open a document I want to work on it does not open on my desktop. It appears as open on mission control but it disappears offscreen. How can I get it to open where i need it and can work on it?

    I am trying to use powerpoint but when I open a document I want to work on it does not open on my desktop. It appears as open on mission control but it disappears offscreen. How can I get it to open where i need it and can work on it?

    It's almost certainly too late.
    The time to create a backup is before a catastrophe.  After a catastrophe, it's too late.

  • I have a question about Lightroom 5... I used it last night, I go to get on it today and its will not open. I have an error msg "Lightroom encountered an error when reading from its preview cache and needs to quit" Lightroom will attempt to fix the proble

    I have a question about Lightroom 5... I used it last night, I go to get on it today and its will not open. I have an error msg "Lightroom encountered an error when reading from its preview cache and needs to quit" Lightroom will attempt to fix the problem when reopened

    https://forums.adobe.com/message/6219922#6219922
    See if the issue in the thread above helps you to solve your problem.

  • Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe acco

    Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe account.

    Can you please show a screenshot of what exactly you want to replace where?

  • I bought an iPhone 4S at a supplier who uses Talkmobile. When I called to port my number to GiffGaff they said the phone did not need to be unlocked even though the guy who sold my husband the phone at the Warehouse place said you did. Now I have an ac

    I bought an iPhone 4S at a supplier who uses Talkmobile. When I switched to GiffGaff and asked the Talkmobile people to port my number and the code which they gave me, they told me my iPhone was never locked and did not need to be unlocked. Now my GiffGaff seems to be up and running and my husband can even leave new voicemail messages but I cannot access my phone. Everytime I put the SIM in it says it's not a valid SIM and that I need a supported carrier SIM. To me that sounds like the phone is locked.

    My husband (who set this up) is going over to Carphone Warehouse right now. He seemed to think that it was locked. But when we asked the carrier we picked, they said it was not locked so they could not unlock it. 
    Are all of you answering these questions familiar with the UK carriers? I am from the US but this was bought and serviced in the UK--nothing to do with the US.
    Maybe the vendor who sold the phone can/will unlock it for us no problem. I guess I will know in the next 5-6 hours. I have just been without a phone for almost an entire day now and it's very frustrating and I thought someone might have had this exact problem and could answer the question for me outright.
    Thanks for everyone's help. Sorry to take up your time.

  • I need to use a Driver Version 1.4 for my my Sharp printer.  When I add the printer, it is driver version 1.3?

    I need to use Driver Version 1.4 for my Sharp printer.  When I add the printer it says Version 1.3?

    Have you asked Sharp whether they have a driver that is Mavericks compliant?

  • Ive just signed up for the adobe photoshop pack, i use a mac, when i click download, nothing is happening..  Am I doing something wrong?? When I try and open the software I already had from trial it says its expired,  or i need to use a serial number... H

    Ive just signed up for the adobe photoshop pack, i use a mac, when i click download, nothing is happening..  Am I doing something wrong?? When I try and open the software I already had from trial it says its expired,  or i need to use a serial number... HELP Anyone else experienced this?

    If there is an option to "license this software", and it takes you to a sign-in page with username and password (not a serial number) - then just go ahead and sign in.
    If it insists on a serial number you need to uninstall the trial. Then try to download again.

  • Downloaded 5.01 and latest itunes. Had errors on iphone needed to restore now when i plug into itunes it freezes  I need to use task master to close.if i plug my wifes phone in no problems with itunes  took it to apple store tech no help.

    Have iphone 3g with 5.0  I downloaded 5.01 for phone and itunes latest download. Had errors on download and needed to restore. Everything came back except apps.
    Pluged into itunes and it gave me the restore screen. restored again.  Now when i plug into itunes it shows my phone but freezes up. I need to use task master to close itunes. Went to apple store tech. No help  said to use Icloud but no WiFi is available.  My wife's phone works fine with itunes.

    Basic troubleshooting steps clearly outlined in the User Guide are restart, reset, restore from backup, restore as new device.
    If you have gone through ALL the above steps and are still having problems, then you'll need to bring your phone into Apple for evaluation.

Maybe you are looking for