add some sanity checks for execution concurrency parameters
This commit is contained in:
parent
c5f878c941
commit
4b6e7cc30d
@ -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{}
|
mx := &sync.Mutex{}
|
||||||
cond := sync.NewCond(mx)
|
cond := sync.NewCond(mx)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user