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.
This commit is contained in:
Garrett D'Amore 2021-01-24 16:48:47 -08:00
parent 13bc6c2778
commit 19e17097d8
1 changed files with 3 additions and 0 deletions

View File

@ -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