From 290f52052e8a74eba42872d642e5ec102fba2d3d Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Fri, 4 Aug 2023 15:51:41 +0200 Subject: [PATCH] Address feedback on zlib change (#1728) --- lib/zlib.toit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/zlib.toit b/lib/zlib.toit index 433179665..7aa457ce0 100644 --- a/lib/zlib.toit +++ b/lib/zlib.toit @@ -232,8 +232,8 @@ abstract class Coder_: signal_ /monitor.Signal := monitor.Signal state_/int := STATE_READY_TO_READ_ | STATE_READY_TO_WRITE_ - static STATE_READY_TO_READ_ ::= 1 - static STATE_READY_TO_WRITE_ ::= 2 + static STATE_READY_TO_READ_ ::= 1 << 0 + static STATE_READY_TO_WRITE_ ::= 1 << 1 constructor .zlib_: reader = ZlibReader.private_ @@ -259,12 +259,12 @@ abstract class Coder_: return result close_read_ -> none: - state_ |= STATE_READY_TO_WRITE_ - signal_.raise if not closed_read_: closed_read_ = true if closed_write_: uninit_ + state_ |= STATE_READY_TO_WRITE_ + signal_.raise write --wait/bool=true data -> int: if closed_read_: throw "READER_CLOSED"