Skip to content

Commit 8309a02

Browse files
committed
More comment fixes, mostly with /* blocks.
1 parent acaa8d1 commit 8309a02

File tree

5 files changed

+31
-23
lines changed

5 files changed

+31
-23
lines changed

Extension/src/Debugger/lldb-dap-worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export async function isValidLldbDap(lldbDap: string | undefined) {
263263
if (!isMainThread) {
264264
// If this is loaded in a worker thread, we'll set up the remoting interface.
265265
try {
266-
/** This is the SNARE remote call interface dispatcher that the worker thread supports */
266+
/** This is the SNARE remote call interface dispatcher that the worker thread supports. */
267267
remote = parentPort ? startRemoting(parentPort, {
268268
// These are the functions that this worker exposes to the parent thread.
269269
findLldbDapImpl

Extension/src/Utility/Async/manualPromise.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ export class ManualPromise<T = void> implements Promise<T> {
4343
* A method to manually resolve the Promise.
4444
*/
4545
public resolve: (value?: T | PromiseLike<T> | undefined) => void = (v) => {
46-
void v; /* */
46+
void v;
4747
};
4848

4949
/**
5050
* A method to manually reject the Promise
5151
*/
5252
public reject: (e: any) => void = (e) => {
53-
void e; /* */
53+
void e;
5454
};
5555

5656
private state: 'pending' | 'resolved' | 'rejected' = 'pending';

Extension/src/Utility/Remoting/snare.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,27 +70,35 @@ export interface RemoteConnection {
7070
connection: Worker | MessagePort;
7171

7272
/** Terminates the connection and cleans up resources. */
73-
terminate(): void; /**
73+
terminate(): void;
74+
75+
/**
7476
* Makes a request to the remote thread and awaits a response.
7577
*
7678
* @param operation The operation name to invoke.
7779
* @param parameters Parameters to pass to the remote operation.
7880
* @returns A promise that resolves with the operation result.
7981
*/
80-
request(operation: string, ...parameters: any[]): Promise<any>; /**
82+
request(operation: string, ...parameters: any[]): Promise<any>;
83+
84+
/**
8185
* Sends a notification to the remote thread (fire and forget).
8286
*
8387
* @param operation The operation name to invoke.
8488
* @param parameters Parameters to pass to the remote operation.
8589
*/
86-
notify(operation: string, ...parameters: any[]): void; /**
90+
notify(operation: string, ...parameters: any[]): void;
91+
92+
/**
8793
* Creates a proxy for a remote object.
8894
*
8995
* @param ctor Constructor for the proxy type.
9096
* @param instance Promise of a remote object instance ID.
9197
* @returns Promise of a proxy to the remote object.
9298
*/
93-
marshall<T extends MarshalByReference>(ctor: new (remote: RemoteConnection, instance: number) => T, instance: Promise<number>): Promise<T | undefined>; /**
99+
marshall<T extends MarshalByReference>(ctor: new (remote: RemoteConnection, instance: number) => T, instance: Promise<number>): Promise<T | undefined>;
100+
101+
/**
94102
* Creates a proxy for a remote object.
95103
*
96104
* @param ctor Constructor for the proxy type.
@@ -286,8 +294,8 @@ function sanitize(value: any) {
286294
/**
287295
* Sanitizes an array of parameters for remoting.
288296
*
289-
* @param parameters Array of parameter values to sanitize
290-
* @returns Array of sanitized parameters
297+
* @param parameters Array of parameter values to sanitize.
298+
* @returns Array of sanitized parameters.
291299
*/
292300
function sanitizeParameters(parameters: any[]) {
293301
return parameters.map(sanitize);
@@ -414,7 +422,9 @@ export function unref(identity: number) {
414422
*/
415423
export class MarshalByReference implements Disposable {
416424
constructor(protected remote: RemoteConnection, protected instance: number) {
417-
} /**
425+
}
426+
427+
/**
418428
* This disposes the ByRef object and notifies the remote thread to reduce the refcount,
419429
* which would dispose the remote object if it was the last reference.
420430
*/

Extension/src/common-remote-safe.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See 'LICENSE' in the project root for license information.
44
* ------------------------------------------------------------------------------------------ */
55

6-
/** @file The functions here are safe to call from a worker thread or the main thread. */
6+
/** @file The functions here are safe to call from a worker thread or the main thread. */
77

88
import { ChildProcess, spawn } from 'node:child_process';
99
import { access, constants, readdir, stat } from 'node:fs/promises';
@@ -149,16 +149,12 @@ export interface Disposable {
149149
*
150150
* @example
151151
* item.onDidChange(function(event) { console.log("Event happened: " + event); });
152+
*
153+
* @param listener The listener function will be called when the event happens.
154+
* @param thisArgs The `this`-argument which will be used when calling the event listener.
155+
* @param disposables An array to which a {@link Disposable} will be added.
156+
* @returns A disposable which unsubscribes the event listener.
152157
*/
153-
/**
154-
* A function that represents an event to which you subscribe by calling it with
155-
* a listener function as argument.
156-
*
157-
* @param listener The listener function will be called when the event happens.
158-
* @param thisArgs The `this`-argument which will be used when calling the event listener.
159-
* @param disposables An array to which a {@link Disposable} will be added.
160-
* @returns A disposable which unsubscribes the event listener.
161-
*/
162158
export type Event<T> = (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]) => Disposable;
163159

164160
/** The key for a localize call.
@@ -296,7 +292,7 @@ interface ProcessOutput {
296292
* @param continueOn Optional string pattern that, when found in stdout, will cause the process to be considered complete before it exits.
297293
* @param skipLogging Optional flag to skip logging process output.
298294
* @param cancellationToken Optional token that can be used to cancel the process.
299-
* @returns A promise that resolves to the process output, including stdout, stderr and exit code.
295+
* @returns A promise that resolves to the process output, including stdout, stderr and exit code.
300296
*/
301297
async function spawnChildProcessImpl(program: string, args: string[], continueOn?: string, skipLogging?: boolean, cancellationToken?: CancellationToken): Promise<ProcessOutput> {
302298
const result = new ManualPromise<ProcessOutput>();
@@ -313,7 +309,9 @@ async function spawnChildProcessImpl(program: string, args: string[], continueOn
313309
appendLine(localize('killing.process', 'Killing process {0}', program));
314310

315311
proc.kill();
316-
}); /** Cleans up resources associated with the process.
312+
});
313+
314+
/** Cleans up resources associated with the process.
317315
* Removes all event listeners and disposes the cancellation token listener.
318316
*/
319317
const clean = () => {

Extension/src/links.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* See 'LICENSE' in the project root for license information.
44
* ------------------------------------------------------------------------------------------ */
55

6-
// Centralized https links that are used by the extension
6+
// Centralized https links that are used by the extension.
77

88
/** Link to documentation on how to troubleshoot LLDB-DAP. */
99
export const TroubleshootingLldbDap = "https://aka.ms/vscode-cpptools/TroubleshootingLldbDap";

0 commit comments

Comments
 (0)