Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gopool中的f func()能否新增可入参的 func()类型? #193

Closed
CC-Cheunggg opened this issue Dec 4, 2023 · 2 comments
Closed

gopool中的f func()能否新增可入参的 func()类型? #193

CC-Cheunggg opened this issue Dec 4, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@CC-Cheunggg
Copy link

Summary

gopool中的f func()能否新增可入参的 func()类型?

Motivation

形参的使用场景,还是比较多的

Explanation

No response

@CC-Cheunggg CC-Cheunggg added the enhancement New feature or request label Dec 4, 2023
@joway
Copy link
Collaborator

joway commented Dec 4, 2023

@RPCheung 可以自己封装:

func(args interface{}) func() {
    return func() { println(args) }
}

@CC-Cheunggg
Copy link
Author

明白了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants