add some sanity checks for execution concurrency parameters

This commit is contained in:
vyzo 2023-03-23 18:52:37 +02:00
parent 2a0660447a
commit 317a87d669

View File

@ -165,6 +165,15 @@ func init() {
}
}
// some sanity checks
if available < 2 {
panic("insufficient execution concurrency")
}
if priority > available-1 {
panic("insufficient default execution concurrency")
}
mx := &sync.Mutex{}
cond := sync.NewCond(mx)