From aa530f352b0410150bfe94c821ae32c1378b9d02 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Thu, 26 Nov 2009 09:35:49 +0200 Subject: libtf: stackable timeouts instead of having per-function argument, use a push/pop mechanism: - multiple timers inside fiber use only one heap entry - easy to chain multiple possibly blocking operations inside one timeout block --- test/read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/read.c') diff --git a/test/read.c b/test/read.c index 97f25fd..6d8306b 100644 --- a/test/read.c +++ b/test/read.c @@ -24,7 +24,7 @@ static void io_fiber(void *ptr) tf_open_fd(&fin, STDIN_FILENO, TF_FD_STREAM_ORIENTED); while (1) { - if (tf_read(&fin, data, sizeof(data), TF_NO_TIMEOUT) < 0) + if (tf_read_fully(&fin, data, sizeof(data)) < 0) break; printf("Read: %8.8s\n", data); } -- cgit v1.2.3