mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	loop: never try to block in the thread
When we are calling invoke from the thread, the call will be completed in the thread and there is no need to block for completion.
This commit is contained in:
		
							parent
							
								
									0881d5b881
								
							
						
					
					
						commit
						4f816c1fb0
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -187,7 +187,7 @@ loop_invoke(void *object,
 | 
				
			||||||
	item->func = func;
 | 
						item->func = func;
 | 
				
			||||||
	item->seq = seq;
 | 
						item->seq = seq;
 | 
				
			||||||
	item->size = size;
 | 
						item->size = size;
 | 
				
			||||||
	item->block = block;
 | 
						item->block = block && !in_thread;
 | 
				
			||||||
	item->user_data = user_data;
 | 
						item->user_data = user_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	spa_log_trace(impl->log, NAME " %p: add item %p filled:%d", impl, item, filled);
 | 
						spa_log_trace(impl->log, NAME " %p: add item %p filled:%d", impl, item, filled);
 | 
				
			||||||
| 
						 | 
					@ -213,7 +213,7 @@ loop_invoke(void *object,
 | 
				
			||||||
		loop_signal_event(impl, impl->wakeup);
 | 
							loop_signal_event(impl, impl->wakeup);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (block) {
 | 
						if (block && !in_thread) {
 | 
				
			||||||
		uint64_t count = 1;
 | 
							uint64_t count = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		spa_loop_control_hook_before(&impl->hooks_list);
 | 
							spa_loop_control_hook_before(&impl->hooks_list);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue