Add new queuing features to @futurize
- max_instances renamed to max_running - consider_args parameter: if True, $max_running of this function with the same arguments can be running, else: $max_running of this function, no matter the arguments, can be running - discard_if_max_running: if True and there are already the maximum possible number of running functions running, cancel this task (previous default behavior), else: Wait for a spot to be free before running
This commit is contained in:
		@@ -60,7 +60,7 @@ class Backend(QObject):
 | 
			
		||||
 | 
			
		||||
    @pyqtSlot(str, result="QVariant")
 | 
			
		||||
    @pyqtSlot(str, bool, result="QVariant")
 | 
			
		||||
    @futurize()
 | 
			
		||||
    @futurize(max_running=1, consider_args=True)
 | 
			
		||||
    def getUserDisplayName(self, user_id: str, can_block: bool = True) -> str:
 | 
			
		||||
        if user_id in self._queried_displaynames:
 | 
			
		||||
            return self._queried_displaynames[user_id]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user