由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - A message Queue question
相关主题
php+apache timeout 的问题Poll: Full-time SDEs over 200k, how'd you get there?
对pthread熟悉的XD请进来看看Full-time SDE in the Bay Area annual salary poll
请教一个concurrentlinkedqueue的用法问题大家从server push数据到client side,用啥办法好些?
问一个同步问题when should use multiprocess not multithread: embedded mult (转载)
有懂BlazeDS/Flex Streaming的吗?被反复打脸,你们就只能上来就PA了
像QQ/FB chat/GTalk这些是怎么实时检查用户状态?谁能帮我看一下错误在哪里?
IE BHO有没有谁真的做web的用FP在production上主要产品
Poll: How long have you been programming for?cnn.com怎么经常freeze,需要重新refresh?
相关话题的讨论汇总
话题: queue话题: message话题: does话题: thread
进入Programming版参与讨论
1 (共1页)
f******r
发帖数: 2975
1
Hi I get to know PostThreadMessage. For this function
The thread to which the message is posted must have created a message queue,
or else the call to PostThreadMessage fails.
Now I am thinking of writing this kind of program in C++ in LinuX
Does anyone have some tutorial for this message queue, and how does it work?
Thanks a lot!
c********e
发帖数: 383
2
just general queue implementation with scynchronization (mutex, condition var
etc).
the easy one is that the reader thread keeps polling on the queue which is a
waste of CPU. however you can let the writer thread to signal the reader
thread on certain conditions.
others might be used is all about the algorithm. like high/low water mark,
leaking bucket for flow control etc...

【在 f******r 的大作中提到】
: Hi I get to know PostThreadMessage. For this function
: The thread to which the message is posted must have created a message queue,
: or else the call to PostThreadMessage fails.
: Now I am thinking of writing this kind of program in C++ in LinuX
: Does anyone have some tutorial for this message queue, and how does it work?
: Thanks a lot!

1 (共1页)
进入Programming版参与讨论
相关主题
cnn.com怎么经常freeze,需要重新refresh?有懂BlazeDS/Flex Streaming的吗?
java WatchService on url像QQ/FB chat/GTalk这些是怎么实时检查用户状态?
socket.io doesn't work with IEIE BHO
开始折腾DPDK+mTCPPoll: How long have you been programming for?
php+apache timeout 的问题Poll: Full-time SDEs over 200k, how'd you get there?
对pthread熟悉的XD请进来看看Full-time SDE in the Bay Area annual salary poll
请教一个concurrentlinkedqueue的用法问题大家从server push数据到client side,用啥办法好些?
问一个同步问题when should use multiprocess not multithread: embedded mult (转载)
相关话题的讨论汇总
话题: queue话题: message话题: does话题: thread