-
Notifications
You must be signed in to change notification settings - Fork 55
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
code style problem #19
Comments
it 's c ; not java ; no gc i'm also considered this question. infact i didn't know there is a better way to implement. if you know. please teach me. 2013/1/6 microcai [email protected]
|
Hi, For busy loop designed for receiving messages, I must admit that there are little suck for this design. So, if you have any better suggestion, patches are welcome! |
I have an libwebqq implemented inside qqbot (https://github.com/microcai/qqbot ) Just one thread, no busy loop. two polling connection. every thing is done async. must of the code is copy&paste from lwqq . |
good job 2013/1/7 microcai [email protected]
|
If you develop in C, the trick is to use glib. glib provide g_new/g_free , and for async loop, you have g_main_loop |
There is a lot malloc/free . very bad code style
and use busy loop to waiting for messages ( I'm not refer to the pull form TX server, but the pthread that check for the message queue. )
bad code style
lot of void* , bad code style
:(
hope you guys will improve
The text was updated successfully, but these errors were encountered: