summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/chan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/chan.c')
-rw-r--r--src/pkg/runtime/chan.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pkg/runtime/chan.c b/src/pkg/runtime/chan.c
index 9e88e824a..16c02e8e7 100644
--- a/src/pkg/runtime/chan.c
+++ b/src/pkg/runtime/chan.c
@@ -631,9 +631,11 @@ void
printf("select: sel=%p\n", sel);
if(sel->ncase < 2) {
- if(sel->ncase < 1)
- throw("select: no cases");
- // make special case of one.
+ if(sel->ncase < 1) {
+ g->status = Gwaiting; // forever
+ gosched();
+ }
+ // TODO: make special case of one.
}
// select a (relative) prime