 	__device__ __host__ void sendDone() {
 		command = DONE;
 		has_task = true;
-
-		// wait for wrapper thread to accept
-		while (!task_accepted) {
-		}
-
-		printf(
-				"KernelWrapper::sendDone: has_task: %s, task_accepted: %s, lock_thread_id: %d, command: %d\n",
-				(has_task) ? "true" : "false",
-				(task_accepted) ? "true" : "false", lock_thread_id, command);
+		//__threadfence_system();
+
+		//printf(
+		//		"KernelWrapper::sendDone: has_task: %s, lock_thread_id: %d, command: %d\n",
+		//		(has_task) ? "true" : "false", lock_thread_id, command);
 
 		// wait for socket communication to end
 		while (!result_available) {


		reset();
		done = true;
		return;
	}
};


			(h_kernelWrapper->is_monitoring) ? "true" : "false");

	// test call host_kernelWrapper
	for (int i = 0; i < 5; i++) {
		h_kernelWrapper->lock_thread_id = i;
		int value = h_kernelWrapper->getValue(i);
		printf("Host h_kernelWrapper getValue: %d\n", value);
	}

	KernelWrapper *d_kernelWrapper;
	checkCuda(cudaHostGetDevicePointer(&d_kernelWrapper, h_kernelWrapper, 0));
