Skip to content

Commit 0a07f18

Browse files
committed
[Futures] Fix up some comments to address some comments.
1 parent aa76672 commit 0a07f18

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

include/swift/ABI/Task.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ class AsyncTask : public HeapObject, public Job {
246246
public:
247247
/// Describes the status of the future.
248248
///
249-
/// Futures always being in the "Executing" state, and will always
249+
/// Futures always begin in the "Executing" state, and will always
250250
/// make a single state change to either Success or Error.
251251
enum class Status : uintptr_t {
252252
/// The future is executing or ready to execute. The storage
@@ -266,7 +266,6 @@ class AsyncTask : public HeapObject, public Job {
266266
std::atomic<Status> status;
267267

268268
/// Queue containing all of the tasks that are waiting in `get()`.
269-
/// FIXME: do we also need a context pointer for each?
270269
std::atomic<AsyncTask*> waitQueue;
271270

272271
/// The type of the result that will be produced by the future.
@@ -298,8 +297,6 @@ class AsyncTask : public HeapObject, public Job {
298297
reinterpret_cast<char *>(this) + storageOffset(resultType));
299298
}
300299

301-
/// Retrieve a reference to the storage of the
302-
303300
/// Compute the offset of the storage from the base of the future
304301
/// fragment.
305302
static size_t storageOffset(const Metadata *resultType) {
@@ -329,9 +326,8 @@ class AsyncTask : public HeapObject, public Job {
329326
///
330327
/// \returns the status of the future. If this result is
331328
/// \c Executing, then \c waitingTask has been added to the
332-
/// wait queue and will be scheduled when the future completes or
333-
/// is cancelled. Otherwise, the future has completed and can be
334-
/// queried.
329+
/// wait queue and will be scheduled when the future completes. Otherwise,
330+
/// the future has completed and can be queried.
335331
FutureFragment::Status waitFuture(AsyncTask *waitingTask);
336332

337333
/// Complete this future.

0 commit comments

Comments
 (0)