|
Go to the first, previous, next, last section, table of contents.
- ox_flush(id)
-
:: 送信バッファの強制 flush
- return
-
1
- id
-
子プロセス識別子
- 通常はバッチモードは off であり, データ, コマンド送信ごとに
送信バッファは flush される.
- バッチモードは
"ctrl" コマンドの "ox_batch" スイッチ
で on/off できる.
- 細かいデータを多数送る場合に,
ctrl("ox_batch",1)
でバッチモードを on にすると, バッファがいっぱいになった場合にのみ flush
されるため, overhead が小さくなる場合がある. ただしこの場合には, 最後に
ox_flush(id) を実行して, バッファを強制的に flush する必要が
ある.
ox_pop_cmo , ox_pop_local のように, コマンド送信後
ただちにデータ待ちに入る関数がハングしないよう, これらの関数の内部では
強制 flush が実行されている.
[340] ox_launch_nox();
0
[341] cputime(1);
0
7e-05sec + gc : 4.8e-05sec(0.000119sec)
[342] for(I=0;I<10000;I++)ox_push_cmo(0,I);
0.232sec + gc : 0.006821sec(0.6878sec)
[343] ctrl("ox_batch",1);
1
4.5e-05sec(3.302e-05sec)
[344] for(I=0;I<10000;I++)ox_push_cmo(0,I); ox_flush(0);
0.08063sec + gc : 0.06388sec(0.4408sec)
[345] 1
9.6e-05sec(0.01317sec)
- 参照
-
section
ox_pop_cmo , ox_pop_local , section ctrl
Go to the first, previous, next, last section, table of contents.
|