Index: doc/theses/thierry_delisle_PhD/code/readQ_example/proto-gui/main.cpp
===================================================================
--- doc/theses/thierry_delisle_PhD/code/readQ_example/proto-gui/main.cpp	(revision 6750bcdb1d630bdf635c4e24461723ed4b53777d)
+++ doc/theses/thierry_delisle_PhD/code/readQ_example/proto-gui/main.cpp	(revision d035cf7ae13a327669561d011224e0ae270d5ee5)
@@ -5,4 +5,5 @@
 #include <algorithm>
 #include <atomic>
+#include <iostream>
 #include <memory>
 #include <vector>
@@ -246,5 +247,5 @@
 	std::cout << "(Buffering " << nframes << ")" << std::endl;
 
-	thrdlib_setproccnt( 2 );
+	thrdlib_init( 2 );
 
 	thread_t stats     = thrdlib_create( Stats     );
@@ -262,4 +263,6 @@
 	thrdlib_join( stats     );
 
+	thrdlib_clean();
+
 	std::cout << "----------" << std::endl;
 	std::cout << "# Parks" << std::endl;
Index: doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread.h
===================================================================
--- doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread.h	(revision 6750bcdb1d630bdf635c4e24461723ed4b53777d)
+++ doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread.h	(revision d035cf7ae13a327669561d011224e0ae270d5ee5)
@@ -1,2 +1,5 @@
+#pragma once
 
-#include "thread_pthread.h"
+// #include "thread_pthread.h"
+
+#include "thread_libfibre.h"
Index: doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread_libfibre.h
===================================================================
--- doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread_libfibre.h	(revision d035cf7ae13a327669561d011224e0ae270d5ee5)
+++ doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread_libfibre.h	(revision d035cf7ae13a327669561d011224e0ae270d5ee5)
@@ -0,0 +1,57 @@
+#pragma once
+
+#include <cassert>
+#include <libfibre/cfibre.h>
+
+#if defined(__cforall) || defined(__cpluplus)
+extern "C" {
+#endif
+	//--------------------
+	// Basic types
+	typedef cfibre_t thread_t;
+
+	void * fibre_runner(void * arg) {
+		auto the_main = (void (*)( thread_t ))arg;
+		the_main( cfibre_self() );
+		return nullptr;
+	}
+
+	//--------------------
+	// Basic thread support
+	thread_t thrdlib_create( void (*the_main)( thread_t ) ) {
+		thread_t fibre;
+		cfibre_create( &fibre, nullptr, fibre_runner, (void*)the_main );
+		return fibre;
+	}
+
+	void thrdlib_join( thread_t handle ) {
+		cfibre_join( handle, nullptr );
+	}
+
+	void thrdlib_park( thread_t handle ) {
+		assert( handle == cfibre_self() );
+		cfibre_park();
+	}
+
+	void thrdlib_unpark( thread_t handle ) {
+		cfibre_unpark( handle );
+	}
+
+	void thrdlib_yield( void ) {
+		cfibre_yield();
+	}
+
+	//--------------------
+	// Basic kernel features
+	void thrdlib_init( int procs ) {
+		cfibre_init_n(1, procs );
+	}
+
+	void thrdlib_clean( void ) {
+
+	}
+
+
+#if defined(__cforall) || defined(__cpluplus)
+}
+#endif
Index: doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread_pthread.h
===================================================================
--- doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread_pthread.h	(revision 6750bcdb1d630bdf635c4e24461723ed4b53777d)
+++ doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread_pthread.h	(revision d035cf7ae13a327669561d011224e0ae270d5ee5)
@@ -98,7 +98,6 @@
 	//--------------------
 	// Basic kernel features
-	void thrdlib_setproccnt( int ) {
-
-	}
+	void thrdlib_init( int ) {}
+	void thrdlib_clean( void ) {}
 
 
