I forgot to mention why you need the events on manual reset:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms684342(v=vs.85).a
spx

"Functions such as ReadFile and WriteFile set this handle to the nonsignaled
state before they begin an I/O operation.
When the operation has completed, the handle is set to the signaled state.

Functions such as GetOverlappedResult and the synchronization wait functions
reset auto-reset events to the nonsignaled state.
Therefore, you should use a manual reset event; if you use an auto-reset
event, your application can stop responding if you wait for the operation to
complete and then call GetOverlappedResult with the bWait parameter set to
TRUE."

We should probably document this in both C and Python code when creating the
event.

Thanks,
Alin.

> -----Original Message-----
> From: [email protected] [mailto:ovs-dev-
> [email protected]] On Behalf Of [email protected]
> Sent: Wednesday, August 23, 2017 1:12 PM
> To: 'Russell Bryant' <[email protected]>; Alin Balutoiu
> <[email protected]>
> Cc: [email protected]
> Subject: Re: [ovs-dev] [PATCH] windows, python: set the reset event to
> automatic
> 
> Me and Alin talked about this offline.
> 
> In the case of named pipes you need events with manual reset and initial
> signaled state.
> 
> We need a different event when dealing with sockets on Windows, he will
> address this in a new patch.
> 
> While looking over the code we see another good reason for using ctypes
> instead of pypiwin32 (the implementation of ReadFile).
> 
> Also the code needs a bit of cleanup.
> 
> Thanks,
> Alin.
> 
> > -----Original Message-----
> > From: [email protected] [mailto:ovs-dev-
> > [email protected]] On Behalf Of Russell Bryant
> > Sent: Tuesday, August 22, 2017 6:35 PM
> > To: Alin Balutoiu <[email protected]>
> > Cc: [email protected]
> > Subject: Re: [ovs-dev] [PATCH] windows, python: set the reset event to
> > automatic
> >
> > On Tue, Aug 22, 2017 at 8:41 AM, Alin Balutoiu
> > <[email protected]> wrote:
> > > Comments answered inline.
> > >
> > > Thanks,
> > > Alin Balutoiu.
> > >
> 
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to