Skip to content

Commit f479a3c

Browse files
committed
Update event_loop.h
1 parent 25d1ff2 commit f479a3c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

runtime/js-compute-runtime/core/event_loop.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ namespace core {
1616
typedef bool ProcessAsyncTask(JSContext *cx, int32_t handle, JS::HandleObject context,
1717
JS::HandleObject promise);
1818

19-
// AsyncTask is a JSObject so that we can store other JSObjects inside it, and once the AsyncTask has completed and is erased from the async task queues then the JSObjects it contains will be available to be garbage collected.
20-
// Another approach we can take is to have two queues, one contains the JSObjects for GC and another for plain data
19+
// AsyncTask is a JSObject so that we can store
20+
// other JSObjects inside it, and once the
21+
// AsyncTask has completed and is erased from
22+
// the async task queues then the JSObjects it
23+
// contains will be available to be garbage
24+
// collected.
25+
// Another approach we can take is to have two
26+
// queues, one contains the JSObjects for GC
27+
// and another for plain data
2128
class AsyncTask final : public builtins::BuiltinNoConstructor<AsyncTask> {
2229
public:
2330
static constexpr const char *class_name = "AsyncTask";

0 commit comments

Comments
 (0)