From 19e17097d8fe6b7c7c2fd6e1301e2f63c11bcdcb Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 24 Jan 2021 16:48:47 -0800 Subject: [PATCH] Mark PostEventWait deprecated. At some point in the future this is going to be replaced with a simpler channel design, and the current blocking approach is both non-idiomatic, and fragile. Don't use it. --- screen.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/screen.go b/screen.go index fc0d77f..33dd5b2 100644 --- a/screen.go +++ b/screen.go @@ -88,6 +88,9 @@ type Screen interface { // is dropped, and ErrEventQFull is returned. PostEvent(ev Event) error + // Deprecated: PostEventWait is unsafe, and will be removed + // in the future. + // // PostEventWait is like PostEvent, but if the queue is full, it // blocks until there is space in the queue, making delivery // reliable. However, it is VERY important that this function