Skip to content

Commit 18ffea9

Browse files
authored
docs: update promises grammar (#1026)
1 parent 1ae0c40 commit 18ffea9

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/concurrent-ruby/concurrent/promises.rb

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def resolvable_event
6464
resolvable_event_on default_executor
6565
end
6666

67-
# Created resolvable event, user is responsible for resolving the event once by
68-
# {Promises::ResolvableEvent#resolve}.
67+
# Creates a resolvable event, user is responsible for resolving the event once
68+
# by calling {Promises::ResolvableEvent#resolve}.
6969
#
7070
# @!macro promises.param.default_executor
7171
# @return [ResolvableEvent]
@@ -95,7 +95,7 @@ def future(*args, &task)
9595
future_on(default_executor, *args, &task)
9696
end
9797

98-
# Constructs new Future which will be resolved after block is evaluated on default executor.
98+
# Constructs a new Future which will be resolved after block is evaluated on default executor.
9999
# Evaluation begins immediately.
100100
#
101101
# @!macro promises.param.default_executor
@@ -107,7 +107,7 @@ def future_on(default_executor, *args, &task)
107107
ImmediateEventPromise.new(default_executor).future.then(*args, &task)
108108
end
109109

110-
# Creates resolved future with will be either fulfilled with the given value or rejection with
110+
# Creates a resolved future with will be either fulfilled with the given value or rejected with
111111
# the given reason.
112112
#
113113
# @param [true, false] fulfilled
@@ -119,7 +119,7 @@ def resolved_future(fulfilled, value, reason, default_executor = self.default_ex
119119
ImmediateFuturePromise.new(default_executor, fulfilled, value, reason).future
120120
end
121121

122-
# Creates resolved future with will be fulfilled with the given value.
122+
# Creates a resolved future which will be fulfilled with the given value.
123123
#
124124
# @!macro promises.param.default_executor
125125
# @param [Object] value
@@ -128,7 +128,7 @@ def fulfilled_future(value, default_executor = self.default_executor)
128128
resolved_future true, value, nil, default_executor
129129
end
130130

131-
# Creates resolved future with will be rejected with the given reason.
131+
# Creates a resolved future which will be rejected with the given reason.
132132
#
133133
# @!macro promises.param.default_executor
134134
# @param [Object] reason
@@ -191,7 +191,7 @@ def delay(*args, &task)
191191
delay_on default_executor, *args, &task
192192
end
193193

194-
# Creates new event or future which is resolved only after it is touched,
194+
# Creates a new event or future which is resolved only after it is touched,
195195
# see {Concurrent::AbstractEventFuture#touch}.
196196
#
197197
# @!macro promises.param.default_executor
@@ -215,7 +215,7 @@ def schedule(intended_time, *args, &task)
215215
schedule_on default_executor, intended_time, *args, &task
216216
end
217217

218-
# Creates new event or future which is resolved in intended_time.
218+
# Creates a new event or future which is resolved in intended_time.
219219
#
220220
# @!macro promises.param.default_executor
221221
# @!macro promises.param.intended_time
@@ -241,8 +241,8 @@ def zip_futures(*futures_and_or_events)
241241
zip_futures_on default_executor, *futures_and_or_events
242242
end
243243

244-
# Creates new future which is resolved after all futures_and_or_events are resolved.
245-
# Its value is array of zipped future values. Its reason is array of reasons for rejection.
244+
# Creates a new future which is resolved after all futures_and_or_events are resolved.
245+
# Its value is an array of zipped future values. Its reason is an array of reasons for rejection.
246246
# If there is an error it rejects.
247247
# @!macro promises.event-conversion
248248
# If event is supplied, which does not have value and can be only resolved, it's
@@ -263,7 +263,7 @@ def zip_events(*futures_and_or_events)
263263
zip_events_on default_executor, *futures_and_or_events
264264
end
265265

266-
# Creates new event which is resolved after all futures_and_or_events are resolved.
266+
# Creates a new event which is resolved after all futures_and_or_events are resolved.
267267
# (Future is resolved when fulfilled or rejected.)
268268
#
269269
# @!macro promises.param.default_executor
@@ -281,8 +281,8 @@ def any_resolved_future(*futures_and_or_events)
281281

282282
alias_method :any, :any_resolved_future
283283

284-
# Creates new future which is resolved after first futures_and_or_events is resolved.
285-
# Its result equals result of the first resolved future.
284+
# Creates a new future which is resolved after the first futures_and_or_events is resolved.
285+
# Its result equals the result of the first resolved future.
286286
# @!macro promises.any-touch
287287
# If resolved it does not propagate {Concurrent::AbstractEventFuture#touch}, leaving delayed
288288
# futures un-executed if they are not required any more.
@@ -301,9 +301,9 @@ def any_fulfilled_future(*futures_and_or_events)
301301
any_fulfilled_future_on default_executor, *futures_and_or_events
302302
end
303303

304-
# Creates new future which is resolved after first of futures_and_or_events is fulfilled.
305-
# Its result equals result of the first resolved future or if all futures_and_or_events reject,
306-
# it has reason of the last resolved future.
304+
# Creates a new future which is resolved after the first futures_and_or_events is fulfilled.
305+
# Its result equals the result of the first resolved future or if all futures_and_or_events reject,
306+
# it has reason of the last rejected future.
307307
# @!macro promises.any-touch
308308
# @!macro promises.event-conversion
309309
#
@@ -320,7 +320,7 @@ def any_event(*futures_and_or_events)
320320
any_event_on default_executor, *futures_and_or_events
321321
end
322322

323-
# Creates new event which becomes resolved after first of the futures_and_or_events resolves.
323+
# Creates a new event which becomes resolved after the first futures_and_or_events resolves.
324324
# @!macro promises.any-touch
325325
#
326326
# @!macro promises.param.default_executor

0 commit comments

Comments
 (0)