开发者

POSIX Thread arguments

开发者 https://www.devze.com 2023-02-24 03:47 出处:网络
Can a p开发者_JAVA百科thread only take one argument? So If I wanted to send in a number of arguments, would I send in a struct and open it inside the thread function?Yes, see the documentation on pth

Can a p开发者_JAVA百科thread only take one argument?

So If I wanted to send in a number of arguments, would I send in a struct and open it inside the thread function?


Yes, see the documentation on pthread_create. You can always bundle the needed information in a struct object as you suggest.

0

精彩评论

暂无评论...
验证码 换一张
取 消