Skip to content

Commit 47098ea

Browse files
committed
update comments'
1 parent 1a15fcf commit 47098ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bls/ThreadPool.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ pub fn init(allocator_: Allocator, opts: Opts) (Allocator.Error || std.Thread.Sp
124124
///
125125
/// Cleanup happens in 3 phases:
126126
/// 1) stop accepting new work,
127-
/// 2) finish existing work,
128-
/// 3) cleaning up resources.
127+
/// 2) tell workers to drain queue then exist,
128+
/// 3) wait for workers to finish draining then cleanup
129129
///
130130
/// The pool pointer is invalid after this call.
131131
pub fn deinit(pool: *ThreadPool) void {
@@ -138,7 +138,7 @@ pub fn deinit(pool: *ThreadPool) void {
138138
pool.queue.cond.broadcast();
139139
pool.queue.mutex.unlock();
140140

141-
// Phase 3: wait for workers to finish draining and exit
141+
// Phase 3: wait for workers to finish draining and cleanup
142142
for (pool.threads[0..pool.n_workers]) |t| t.join();
143143
pool.allocator.destroy(pool);
144144
}

0 commit comments

Comments
 (0)