首页 \ 问答 \ 从LinkedBlockingQueue迁移到LMAX的Disruptor(Migrating from LinkedBlockingQueue to LMAX' Disruptor)

从LinkedBlockingQueue迁移到LMAX的Disruptor(Migrating from LinkedBlockingQueue to LMAX' Disruptor)

是否有一些示例代码用于从标准LinkedBlockingQueue迁移到LMAX的Disruptor体系结构? 我有一个事件处理应用程序(单一生产者,多个消费者),可能会受益于此更改。

当我的目标是最大化吞吐量而不是最小化延迟时,它是否有意义?


Is there some example code for migrating from the standard LinkedBlockingQueue to LMAX' Disruptor architecture? I have an event handling application (single producer, multiple consumers) that might benefit from the change.

Does it even make sense when my goal is maximizing throughput rather than minimizing latency?


原文:https://stackoverflow.com/questions/16874534
更新时间:2022-11-17 13:11

最满意答案

你指的是这个:

for ($i=0; $i < $sesion ; $i++) { ?>
<tr><td>FECHA: <? echo(date("d/m/Y", strtotime($fechas[floor($i/2)]))) ?></td></tr>
<? } ?>

floor($ i / 2)在每两个连续循环中保持相同的值


Do you refer to this:

for ($i=0; $i < $sesion ; $i++) { ?>
<tr><td>FECHA: <? echo(date("d/m/Y", strtotime($fechas[floor($i/2)]))) ?></td></tr>
<? } ?>

floor($i/2) keeps same value on each two consecutive loops

相关问答

更多
  • 你指的是这个: for ($i=0; $i < $sesion ; $i++) { ?> FECHA: floor($ i / 2)在每两个连续循环中保持相同的值 Do you refer to this: for ($i=0; $i < $sesion ; $i++) { ?> FECHA:
  • 我用过'recursive'=> 0 $this->->find('all', array( 'recursive' => 0, 'fields' => array('Table_2.id','Table_2.titel','Table_2.vorname', 'Table_2.nachname'))); I've used 'recursive' => 0 $this->->find('all', array( 'recursive' => 0, 'fie ...
  • 以下适用于我(在IE8上测试)。 请注意:我不认为这是一个“最佳实践”的答案,只是对您目前所获得的内容进行粗略的改编,因此它实际上有效且稍微更具可读性。