473,465 Members | 1,366 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

waitHandle class

1 New Member
I have a problem in managed C++ code.

I have an ArgumentNullException in:
result = System::Threading::WaitHandle::WaitAny(waitHandles );

I have defined withHandles:
AutoResetEvent ^onNewImageEvent = gcnew AutoResetEvent(false);
AutoResetEvent ^onStopLiveEvent = gcnew AutoResetEvent(false);
array<WaitHandle^> ^waitHandles=gcnew array<WaitHandle^>{onStopLiveEvent,onNewImageEvent };

What is the problem? Is it the definition of waitHandles?

Thanks in advance.
Apr 15 '10 #1
0 1222

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: pokémon | last post by:
Can someone please post a working example of how to use the WaitAny() method. Thanks.
1
by: | last post by:
Is there any way to find out: 1. which thread is holding a monitor object? 2. how many Monitor.Enter() has been called on an object? 3. which WaitHandle is signaled after WaitHandle.WaitAny()? ...
1
by: Bob Rock | last post by:
Hello, did anyone notice that the WaitHandle class is not abstract as the ..NET SDK documentation says? Bob Rock
1
by: Larry Lard | last post by:
Just now I translated Jon Skeet's WaitHandle.WaitAny / .WaitAll (<http://yoda.arachsys.com/csharp/threads/waithandles.shtml>) from C# into VB.NET, and after the first go I ran into trouble: ...
0
by: Amir Shitrit | last post by:
Hi to all. What is difference between the methods found in the Monitor, Interlocked and WaitHandle classes in terms of performance? Is it true that Monitor.Wait uses the Interlocked class behind...
1
by: Sean | last post by:
I am looking at using delegates to perform an asynchronous call. There will be a callback invoked at the end of the call. The client thread will wait on the WaitHandle from IAsyncResult (which is...
14
by: Dave Booker | last post by:
I'm doing some analysis that is readily broken up into many independent pieces, on a multicore machine. I thought it would be best to just queue like 1000 of these pieces in the ThreadPool, and...
1
by: archana | last post by:
Hi all, can anyone tell me exact meaning of exitcontext of waithandle.waitany. What exactly synchronization domain means? i am having one windows application in which i creating some thread...
1
by: archana | last post by:
Hi all, can anyone tell me exact meaning of exitcontext of waithandle.waitany. What exactly synchronization domain means? i am having one windows application in which i creating some thread...
0
by: UL-Tomten | last post by:
Is the WaitHandle on the IAsyncResult returned from BeginProcessRequest ever used by the HTTP application? The reason I'm asking is that in the MSDN article "How to: Create an Asynchronous HTTP...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.