From patchwork Tue Aug 22 10:47:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin Balutoiu X-Patchwork-Id: 804386 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xc6js1lfHz9s83 for ; Tue, 22 Aug 2017 20:48:49 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 854A2AB7; Tue, 22 Aug 2017 10:47:30 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D7268AB2 for ; Tue, 22 Aug 2017 10:47:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cloudbasesolutions.com (mail.cloudbasesolutions.com [91.232.152.5]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id A21F7171 for ; Tue, 22 Aug 2017 10:47:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id DAD8444352 for ; Tue, 22 Aug 2017 13:47:27 +0300 (EEST) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from mail.cloudbasesolutions.com ([127.0.0.1]) by localhost (mail.cloudbasesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tly-YDSWmOeJ for ; Tue, 22 Aug 2017 13:47:27 +0300 (EEST) Received: from mail.cloudbasesolutions.com (unknown [10.77.78.3]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id A557F44338 for ; Tue, 22 Aug 2017 13:47:27 +0300 (EEST) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0361.001; Tue, 22 Aug 2017 12:47:27 +0200 From: Alin Balutoiu To: "dev@openvswitch.org" Thread-Topic: [PATCH] windows,python: set the reset event to automatic Thread-Index: AQHTGzQL0PvOTzJvTU+qU94fISNxBw== Date: Tue, 22 Aug 2017 10:47:26 +0000 Message-ID: <1503398837-2498-3-git-send-email-abalutoiu@cloudbasesolutions.com> References: <1503398837-2498-1-git-send-email-abalutoiu@cloudbasesolutions.com> In-Reply-To: <1503398837-2498-1-git-send-email-abalutoiu@cloudbasesolutions.com> Accept-Language: en-US, it-IT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.77.78.1] MIME-Version: 1.0 Subject: [ovs-dev] [PATCH] windows, python: set the reset event to automatic X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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. This commit sets from manual reset to automatic reset for the events on the overlapped read/write structures. Signed-off-by: Alin Balutoiu Acked-by: Russell Bryant --- 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