On Tue, Aug 22, 2017 at 6:47 AM, Alin Balutoiu
<abalut...@cloudbasesolutions.com> wrote:
> The overlapped structures used for read and write operations
> get an event with manual reset flag set on True.
>
> At the moment events are waiting to be reset with their
> state being always signaled.

Just making sure I understand ... once an event was raised for a fd,
it was never reset?  What was the side effect?  Did it turn the event
loop into a busy loop?

> This commit sets from manual reset to automatic reset
> for the events on the overlapped read/write structures.
>
> Signed-off-by: Alin Balutoiu <abalut...@cloudbasesolutions.com>
> ---
>  python/ovs/stream.py | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/python/ovs/stream.py b/python/ovs/stream.py
> index f82a449..b30c4aa 100644
> --- a/python/ovs/stream.py
> +++ b/python/ovs/stream.py
> @@ -103,9 +103,11 @@ class Stream(object):
>          self.pipe = pipe
>          if sys.platform == 'win32':
>              self._read = pywintypes.OVERLAPPED()
> -            self._read.hEvent = winutils.get_new_event()
> +            self._read.hEvent = winutils.get_new_event(bManualReset=False,
> +                                                       bInitialState=False)
>              self._write = pywintypes.OVERLAPPED()
> -            self._write.hEvent = winutils.get_new_event()
> +            self._write.hEvent = winutils.get_new_event(bManualReset=False,
> +                                                        bInitialState=False)
>              if pipe is not None:
>                  # Flag to check if fd is a server HANDLE.  In the case of a
>                  # server handle we have to issue a disconnect before closing
> --
> 2.10.0.windows.1
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev



-- 
Russell Bryant
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to