From 5c384cab27113e74c998811d85f65700c0827060 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Mon, 16 May 2022 07:05:17 +0000 Subject: Implement timeouts for receive --- apl9.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apl9.h') diff --git a/apl9.h b/apl9.h index e56014b..bf36f52 100644 --- a/apl9.h +++ b/apl9.h @@ -52,6 +52,7 @@ typedef enum ELength = 5, EValue = 6, EDomain = 11, + ETimeout = 12, /* not in dyalog */ ENotImplemented = 100, /* not in dyalog */ } errorCodes; @@ -236,10 +237,12 @@ struct ThreadData Mail *mail; Mail *lastmail; int lasterror; + int timeout; /* number of milli seconds to timeout */ + int timedout; /* true if the recv timed out */ Rune *lasterrormsg; ErrorGuard *globalerrorguard; QLock lock; - Rendez empty; + Rendez newmail; }; struct Mail -- cgit v1.2.3