1
0
Fork 0
mirror of https://github.com/ii64/gouring.git synced 2025-04-03 12:35:52 +02:00
gouring/options.go
Nugraha 6140a6ea1d
fix: SQThread option should add IORING_SETUP_SQPOLL
Signed-off-by: Nugraha <26342994+ii64@users.noreply.github.com>
2022-02-11 19:54:24 +07:00

13 lines
244 B
Go

package gouring
// Option
type Option func(p *IOUringParams)
// SQThread option
func SQThread(cpu, idleMS uint32) Option {
return func(p *IOUringParams) {
p.SQThreadCPU = cpu
p.SQThreadIdle = idleMS
p.Flags |= IORING_SETUP_SQPOLL
}
}