mirror of
				https://github.com/datarhei/core.git
				synced 2025-10-31 11:26:52 +08:00 
			
		
		
		
	Adjust comments
This commit is contained in:
		| @@ -425,6 +425,7 @@ func (l *limiter) Limit(cpu, memory bool) error { | ||||
| // limitCPU will limit the CPU usage of this process. The limit is the max. CPU usage | ||||
| // normed to 0-1. The interval defines how long a time slot is that will be splitted | ||||
| // into sleeping and working. | ||||
| // Inspired by https://github.com/opsengine/cpulimit | ||||
| func (l *limiter) limitCPU(ctx context.Context, limit float64, interval time.Duration) { | ||||
| 	defer func() { | ||||
| 		l.lock.Lock() | ||||
|   | ||||
| @@ -43,7 +43,7 @@ type Process interface { | ||||
| 	// running or not. | ||||
| 	IsRunning() bool | ||||
|  | ||||
| 	// Limit enabled or disables CPU and memory limiting. CPU will be throttled | ||||
| 	// Limit enables or disables CPU and memory limiting. CPU will be throttled | ||||
| 	// into the configured limit. If memory consumption is above the configured | ||||
| 	// limit, the process will be killed. | ||||
| 	Limit(cpu, memory bool) error | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ingo Oppermann
					Ingo Oppermann