Index: src/libcfa/concurrency/coroutine
===================================================================
--- src/libcfa/concurrency/coroutine	(revision 242a902cd5fbc4b9c2f13147a4c64816af6be8b7)
+++ src/libcfa/concurrency/coroutine	(revision 83a071f98d287fe0dd150376b0c6ea5ff812b18b)
@@ -26,9 +26,9 @@
 // Anything that is resumed is a coroutine.
 trait is_coroutine(dtype T) {
-      void main(T * this);
-      coroutine_desc * get_coroutine(T * this);
+      void main(T & this);
+      coroutine_desc * get_coroutine(T & this);
 };
 
-#define DECL_COROUTINE(X) static inline coroutine_desc* get_coroutine(X* this) { return &this->__cor; } void main(X* this)
+#define DECL_COROUTINE(X) static inline coroutine_desc* get_coroutine(X& this) { return &this.__cor; } void main(X& this)
 
 //-----------------------------------------------------------------------------
@@ -45,8 +45,8 @@
 
 forall(dtype T | is_coroutine(T))
-static inline void resume(T * cor);
+static inline void resume(T & cor);
 
 forall(dtype T | is_coroutine(T))
-void prime(T * cor);
+void prime(T & cor);
 
 //-----------------------------------------------------------------------------
@@ -87,5 +87,5 @@
 // Resume implementation inlined for performance
 forall(dtype T | is_coroutine(T))
-static inline void resume(T * cor) {
+static inline void resume(T & cor) {
 	coroutine_desc * src = this_coroutine;		// optimization
 	coroutine_desc * dst = get_coroutine(cor);
@@ -93,5 +93,5 @@
 	if( unlikely(!dst->stack.base) ) {
 		create_stack(&dst->stack, dst->stack.size);
-		CtxStart(cor, CtxInvokeCoroutine);
+		CtxStart(&cor, CtxInvokeCoroutine);
 	}
 
