Skip to content

Commit 127cee1

Browse files
committed
Update channel.{txt,jax}
1 parent 1874eb3 commit 127cee1

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

doc/channel.jax

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ send を呼ぶたびに毎回コールバックを指定する代わりに、チ
162162
"auto" メッセージを処理するコールバックがない場合。
163163
"close_cb" もこのために考慮されます。
164164
"never" すべてのメッセージが保存されます。
165+
166+
*channel-noblock*
167+
"noblock" |job-noblock| と同じ効果です。書込みの為だけの事項です。
168+
165169
*waittime*
166170
"waittime" 接続がミリ秒単位で待機する時間。負の数は永遠に待ちます。
167171

@@ -596,6 +600,19 @@ job_setoptions(job, {options}) を使用して、ジョブの開始後にいく
596600
Note: ファイルやバッファに書き込むときやバッファから読
597601
み込むときは、NL モードがデフォルトで使用されます。
598602

603+
*job-noblock*
604+
"noblock": 1 書き込み時に、非ブロッキング書き込み呼び出しを使用しま
605+
す。これは Vim が間に他のメッセージを処理する必要があ
606+
る場合に刺さるのを回避します。例えば、ジョブが Vim に
607+
データを返すとき。これは、`ch_sendraw()` が返されたと
608+
きに、すべてのデータがまだ書き込まれていない可能性があ
609+
ることを意味します。
610+
このオプションはパッチ 8.1.0350 で追加され、以下を使っ
611+
て検査します: >
612+
if has("patch-8.1.350")
613+
let options['noblock'] = 1
614+
endif
615+
<
599616
*job-callback*
600617
"callback": handler チャネルの任意の部分で何かを読むためのコールバック。
601618
*job-out_cb* *out_cb*

en/channel.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ Use |ch_status()| to see if the channel could be opened.
163163
The "close_cb" is also considered for this.
164164
"never" All messages will be kept.
165165

166+
*channel-noblock*
167+
"noblock" Same effect as |job-noblock|. Only matters for writing.
168+
166169
*waittime*
167170
"waittime" The time to wait for the connection to be made in
168171
milliseconds. A negative number waits forever.
@@ -594,6 +597,17 @@ See |job_setoptions()| and |ch_setoptions()|.
594597
Note: when writing to a file or buffer and when
595598
reading from a buffer NL mode is used by default.
596599

600+
*job-noblock*
601+
"noblock": 1 When writing use a non-blocking write call. This
602+
avoids getting stuck if Vim should handle other
603+
messages in between, e.g. when a job sends back data
604+
to Vim. It implies that when `ch_sendraw()` returns
605+
not all data may have been written yet.
606+
This option was added in patch 8.1.0350, test with: >
607+
if has("patch-8.1.350")
608+
let options['noblock'] = 1
609+
endif
610+
<
597611
*job-callback*
598612
"callback": handler Callback for something to read on any part of the
599613
channel.

0 commit comments

Comments
 (0)