kill running thread on restart
This commit is contained in:
		
							parent
							
								
									e4f2452427
								
							
						
					
					
						commit
						f7cb946830
					
				| @ -9,6 +9,11 @@ auto VmProvider::load_and_start(std::vector<uint32_t> instructions) -> void | |||||||
| { | { | ||||||
|     std::lock_guard lock(this->mutex); |     std::lock_guard lock(this->mutex); | ||||||
| 
 | 
 | ||||||
|  |     if (this->running_thread) { | ||||||
|  |         this->vm = {}; | ||||||
|  |         this->running_thread = {}; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     this->vm.emplace(instructions, |     this->vm.emplace(instructions, | ||||||
|         VMOpts { |         VMOpts { | ||||||
|             .flame_graph = true, |             .flame_graph = true, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user