03-05-2008 12:18 PM
03-06-2008 08:49 AM
03-06-2008 08:59 AM - edited 03-06-2008 09:00 AM
Thanks you Dave!
You have proven yourself worthy of your signature!
VADave
CLA
Using LabVIEW since 1.2
Ben
03-06-2008 10:11 AM
03-06-2008 10:29 AM - edited 03-06-2008 10:29 AM
First get the URL of your image. If you have not posted it yet, attach it as you did previously
post the reply then click on your attached link and copy the URL
quickly (5 minute limit on edits) return to your post and edit it.
When editing click the "insert an image" button
paste the image URL into dialog box.
submit edited post.
Again, thanks for sharing your findings!
Ben
03-12-2008 12:05 PM - edited 03-12-2008 12:11 PM
07-10-2017 05:29 PM
I see you're setting "exitContext" to true here. Can you (or anyone) explain why this is necessary (or if it's not), and what it does?
07-11-2017 12:25 AM
TimBlaisdell
Please, take a look at these threads with the similar question:
c# - What is the exitContext used for on a WaitHandle.WaitOne method
.net - What does the exit context mean for a WaitHandle.WaitOne mean?
MSDN - WaitHandle.WaitOne Method (TimeSpan, Boolean)
Btw I wonder why to tie yourself to .NET and its libraries when there's WinAPI's CreateMutex func and its friends... This should run smoothly in any thread and should be faster than .NET approach.
07-11-2017 03:27 PM
I would second the use of the WinAPI functions. Ultimately .Net also uses these kernel objects internally. And since LabVIEW does not generate.Net IL code, there is no real advantage in using the .Net API over the Win32 API, especially since this API is fairly simple to interface (most callers completely ignore the security attributes parameter, which would be fairly complicated to handle correctly).
Look at CreateMutex(), WaitForSingleObject(), ReleaseMutex() and CloseHandle() on MSDN.