Skip to content
Prev Previous commit
Next Next commit
Add todo for --require
  • Loading branch information
aabmass committed Nov 2, 2022
commit c844b8d7ee9c6b56805e82514da11ac9dd70fbcb
4 changes: 2 additions & 2 deletions ts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ if (module.parent && module.parent.id === 'internal/preload') {
// The process is going to terminate imminently. All work here needs to
// be synchronous.

// TODO: this code no longer works because stop() cannot be run synchronously. Maybe
// beforeExit event would be a decent middleground, or can run this in a signal handler.
// TODO #234: this code no longer works because stop() cannot be run synchronously.
// Remove this feature.
const profile = await stop();
const buffer = encodeSync(profile);
writeFileSync(`pprof-profile-${process.pid}.pb.gz`, buffer);
Expand Down