c******n 发帖数: 4965 | 1 【 以下文字转载自 THU 讨论区 】
【 原文由 creation 所发表 】
要交project,
本来觉得很简单的问题,想着半天就应该做出来,
可逐渐发现现有的 packages 都不完全合适
a distributed algorithm protocol implementation
3 phase commit,
I need to show the effect of message delay ,so
I need to introduce artificial delay to real API xxx_send
I do this by spawning a POSIX thread, and then
do usleep() and XXX_send in that thread,
I use PVM for different processes, this is an overkill
but very easy to use because PVM has timed recv, ( I need timeout
in the protocol, and i | h****i 发帖数: 112 | 2 why not use select?
【在 c******n 的大作中提到】 : 【 以下文字转载自 THU 讨论区 】 : 【 原文由 creation 所发表 】 : 要交project, : 本来觉得很简单的问题,想着半天就应该做出来, : 可逐渐发现现有的 packages 都不完全合适 : a distributed algorithm protocol implementation : 3 phase commit, : I need to show the effect of message delay ,so : I need to introduce artificial delay to real API xxx_send : I do this by spawning a POSIX thread, and then
|
|