aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.h
diff options
context:
space:
mode:
authorGravatar Jan Kanis <jan.code@jankanis.nl>2013-01-23 00:19:29 +0100
committerGravatar Jan Kanis <jan.code@jankanis.nl>2013-01-23 00:19:29 +0100
commit70a75dc88aad2beb9c0007eba4af5154ebe58c8d (patch)
treeaac6312e20df58a7715385238c5cc18f768c69ac /reader.h
parentb6bd6e399d97fb107bb05bc16df6ff32fb2f6877 (diff)
implement reader_cancel_thread using __thread thread-local storage
Diffstat (limited to 'reader.h')
-rw-r--r--reader.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/reader.h b/reader.h
index 0942bad0..f26f2740 100644
--- a/reader.h
+++ b/reader.h
@@ -133,6 +133,14 @@ void reader_reset_interrupted();
int reader_reading_interrupted();
/**
+ Returns true if the current reader generation count does not equal the
+ generation count the current thread was started with.
+ Note: currently only valid for autocompletion threads! Other threads don't
+ set the threadlocal generation count when they start up.
+*/
+bool reader_cancel_thread();
+
+/**
Read one line of input. Before calling this function, reader_push()
must have been called in order to set up a valid reader
environment.