Index: libcfa/src/concurrency/io.cfa
===================================================================
--- libcfa/src/concurrency/io.cfa	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ libcfa/src/concurrency/io.cfa	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -635,5 +635,8 @@
 
 			// We can proceed to the fast path
-			if( !__alloc(ctx, &idx, 1) ) return false;
+			if( !__alloc(ctx, &idx, 1) ) {
+				/* paranoid */ verify( false ); // for now check if this happens, next time just abort the sleep.
+				return false;
+			}
 
 			// Allocation was successful
@@ -665,5 +668,5 @@
 
 			/* paranoid */ verify( sqe->user_data == (uintptr_t)&future );
-			__submit( ctx, &idx, 1, true );
+			__submit_only( ctx, &idx, 1 );
 
 			/* paranoid */ verify( proc == __cfaabi_tls.this_processor );
@@ -676,4 +679,6 @@
 			iovec iov;
 			__atomic_acquire( &proc->io.ctx->cq.lock );
+
+			__attribute__((used)) volatile bool was_reset = false;
 
 			with( proc->idle_wctx) {
@@ -687,13 +692,21 @@
 					iov.iov_len  = sizeof(eventfd_t);
 					__kernel_read(proc, *ftr, iov, evfd );
+					ftr->result = 0xDEADDEAD;
+					*((eventfd_t *)rdbuf) = 0xDEADDEADDEADDEAD;
+					was_reset = true;
 				}
 			}
 
-			__ioarbiter_flush( *proc->io.ctx );
-			ioring_syscsll( *proc->io.ctx, 1, IORING_ENTER_GETEVENTS);
+			if( !__atomic_load_n( &proc->do_terminate, __ATOMIC_SEQ_CST ) ) {
+				__ioarbiter_flush( *proc->io.ctx );
+				proc->idle_wctx.sleep_time = rdtscl();
+				ioring_syscsll( *proc->io.ctx, 1, IORING_ENTER_GETEVENTS);
+			}
 
 			ready_schedule_lock();
 			__cfa_do_drain( proc->io.ctx, proc->cltr );
 			ready_schedule_unlock();
+
+			asm volatile ("" :: "m" (was_reset));
 		}
 	#endif
Index: libcfa/src/concurrency/kernel.cfa
===================================================================
--- libcfa/src/concurrency/kernel.cfa	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ libcfa/src/concurrency/kernel.cfa	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -682,4 +682,6 @@
 	this->idle_wctx.sem = 1;
 
+	this->idle_wctx.wake_time = rdtscl();
+
 	eventfd_t val;
 	val = 1;
Index: libcfa/src/concurrency/kernel.hfa
===================================================================
--- libcfa/src/concurrency/kernel.hfa	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ libcfa/src/concurrency/kernel.hfa	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -74,4 +74,7 @@
 	// unused if not using io_uring for idle sleep
 	io_future_t * ftr;
+
+	volatile unsigned long long wake_time;
+	volatile unsigned long long sleep_time;
 };
 
Index: libcfa/src/concurrency/kernel/startup.cfa
===================================================================
--- libcfa/src/concurrency/kernel/startup.cfa	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ libcfa/src/concurrency/kernel/startup.cfa	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -558,4 +558,5 @@
 
 	idle_wctx.sem = 0;
+	idle_wctx.wake_time = 0;
 
 	// I'm assuming these two are reserved for standard input and output
Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/AST/Convert.cpp	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -2717,5 +2717,5 @@
 
 		for (auto & param : foralls) {
-			ty->forall.emplace_back(new ast::TypeInstType(param->name, param));
+			ty->forall.emplace_back(new ast::TypeInstType(param));
 			for (auto asst : param->assertions) {
 				ty->assertions.emplace_back(new ast::VariableExpr({}, asst));
Index: src/AST/Decl.cpp
===================================================================
--- src/AST/Decl.cpp	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/AST/Decl.cpp	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -68,5 +68,5 @@
 	}
 	for (auto & tp : this->type_params) {
-		ftype->forall.emplace_back(new TypeInstType(tp->name, tp));
+		ftype->forall.emplace_back(new TypeInstType(tp));
 		for (auto & ap: tp->assertions) {
 			ftype->assertions.emplace_back(new VariableExpr(loc, ap));
Index: src/AST/Type.cpp
===================================================================
--- src/AST/Type.cpp	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/AST/Type.cpp	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -147,4 +147,8 @@
 // --- TypeInstType
 
+TypeInstType::TypeInstType( const TypeDecl * b,
+	CV::Qualifiers q, std::vector<ptr<Attribute>> && as )
+: BaseInstType( b->name, q, move(as) ), base( b ), kind( b->kind ) {}
+
 void TypeInstType::set_base( const TypeDecl * b ) {
 	base = b;
Index: src/AST/Type.hpp
===================================================================
--- src/AST/Type.hpp	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/AST/Type.hpp	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -421,4 +421,8 @@
 		std::vector<ptr<Attribute>> && as = {} )
 	: BaseInstType( n, q, std::move(as) ), base( b ), kind( b->kind ) {}
+
+	TypeInstType( const TypeDecl * b,
+		CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} );
+
 	TypeInstType( const std::string& n, TypeDecl::Kind k, CV::Qualifiers q = {},
 		std::vector<ptr<Attribute>> && as = {} )
Index: src/Concurrency/KeywordsNew.cpp
===================================================================
--- src/Concurrency/KeywordsNew.cpp	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/Concurrency/KeywordsNew.cpp	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -88,6 +88,5 @@
 		auto typeDecl = ast::deepCopy( typeParam );
 		mutFunc->type_params.push_back( typeDecl );
-		mutType->forall.push_back(
-			new ast::TypeInstType( typeDecl->name, typeDecl ) );
+		mutType->forall.push_back( new ast::TypeInstType( typeDecl ) );
 		for ( auto & assertion : typeDecl->assertions ) {
 			mutFunc->assertions.push_back( assertion );
@@ -108,9 +107,7 @@
 	for ( const ast::ptr<ast::TypeDecl> & typeDecl : mutFunc->type_params ) {
 		paramTypeInst->params.push_back(
-			new ast::TypeExpr( location,
-				new ast::TypeInstType( typeDecl->name, typeDecl ) ) );
+			new ast::TypeExpr( location, new ast::TypeInstType( typeDecl ) ) );
 		typeParamInst->params.push_back(
-			new ast::TypeExpr( location,
-				new ast::TypeInstType( typeDecl->name, typeDecl ) ) );
+			new ast::TypeExpr( location, new ast::TypeInstType( typeDecl ) ) );
 	}
 
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/ResolvExpr/Resolver.cc	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -1385,5 +1385,5 @@
 			for (auto & typeParam : mutDecl->type_params) {
 				symtab.addType(typeParam);
-				mutType->forall.emplace_back(new ast::TypeInstType(typeParam->name, typeParam));
+				mutType->forall.emplace_back(new ast::TypeInstType(typeParam));
 			}
 			for (auto & asst : mutDecl->assertions) {
Index: src/Validate/Autogen.cpp
===================================================================
--- src/Validate/Autogen.cpp	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/Validate/Autogen.cpp	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -248,5 +248,5 @@
 		structInst.params.push_back( new ast::TypeExpr(
 			typeDecl->location,
-			new ast::TypeInstType( typeDecl->name, typeDecl )
+			new ast::TypeInstType( typeDecl )
 		) );
 	}
@@ -264,5 +264,5 @@
 		unionInst.params.push_back( new ast::TypeExpr(
 			unionDecl->location,
-			new ast::TypeInstType( typeDecl->name, typeDecl )
+			new ast::TypeInstType( typeDecl )
 		) );
 	}
Index: src/Validate/ForallPointerDecay.cpp
===================================================================
--- src/Validate/ForallPointerDecay.cpp	(revision edf247ba3a611879d074799b43c41cc7dc168bb8)
+++ src/Validate/ForallPointerDecay.cpp	(revision d4da15359ab98a4b849ed21f5deb4e6afe2889a5)
@@ -41,5 +41,5 @@
 	for ( auto & type_param : decl->type_params ) {
 		type->forall.emplace_back(
-			new ast::TypeInstType( type_param->name, type_param ) );
+			new ast::TypeInstType( type_param ) );
 	}
 	for ( auto & assertion : decl->assertions ) {
