Skip to content

Commit e83f58b

Browse files
joeybloggsjoeybloggs
authored andcommitted
update good formatting
1 parent 7f72b69 commit e83f58b

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

doc.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Pool v2 advantages over Pool v1:
2424
Pool v3 advantages over Pool v2:
2525
2626
- Objects are not interfaces allowing for less breaking changes going forward.
27-
- Now there are 2 Pool types, both completely interchangeable, a limited worker pool and unlimited pool.
27+
- Now there are 2 Pool types, both completely interchangeable, a limited worker pool
28+
and unlimited pool.
2829
- Simpler usage of Work Units, instead of `<-work.Done` now can do `work.Wait()`
2930
3031
Important Information READ THIS!
@@ -39,8 +40,8 @@ important usage information
3940
- When Batching DO NOT FORGET TO CALL batch.QueueComplete(),
4041
if you do the Batch WILL deadlock
4142
42-
- It is your responsibility to call WorkUnit.IsCancelled() to check if it's cancelled after a blocking
43-
operation like waiting for a connection from a pool.
43+
- It is your responsibility to call WorkUnit.IsCancelled() to check if it's cancelled
44+
after a blocking operation like waiting for a connection from a pool.
4445
4546
4647
Usage and documentation

pool.go

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ type Pool interface {
66
// Queue queues the work to be run, and starts processing immediately
77
Queue(fn WorkFunc) WorkUnit
88

9-
// Reset reinitializes a pool that has been closed/cancelled back to a working state.
10-
// if the pool has not been closed/cancelled, nothing happens as the pool is still in
11-
// a valid running state
9+
// Reset reinitializes a pool that has been closed/cancelled back to a working
10+
// state. if the pool has not been closed/cancelled, nothing happens as the pool
11+
// is still in a valid running state
1212
Reset()
1313

14-
// Cancel cancels any pending work still not committed to processing
15-
// call Reset() to reinitialize the pool for use.
14+
// Cancel cancels any pending work still not committed to processing.
15+
// Call Reset() to reinitialize the pool for use.
1616
Cancel()
1717

18-
// Close cleans up pool data and cancels any pending work still not committed to processing
19-
// call Reset() to reinitialize the pool for use.
18+
// Close cleans up pool data and cancels any pending work still not committed
19+
// to processing. Call Reset() to reinitialize the pool for use.
2020
Close()
2121

22-
// Batch creates a new Batch object for queueing Work Units separate from any others
23-
// that may be running on the pool. Grouping these Work Units together allows for individual
24-
// Cancellation of the Batch Work Units without affecting anything else running on the pool
25-
// as well as outputting the results on a channel as they complete.
26-
// NOTE: Batch is not reusable, once QueueComplete() has been called it's lifetime has been sealed
27-
// to completing the Queued items.
22+
// Batch creates a new Batch object for queueing Work Units separate from any
23+
// others that may be running on the pool. Grouping these Work Units together
24+
// allows for individual Cancellation of the Batch Work Units without affecting
25+
// anything else running on the pool as well as outputting the results on a
26+
// channel as they complete. NOTE: Batch is not reusable, once QueueComplete()
27+
// has been called it's lifetime has been sealed to completing the Queued items.
2828
Batch() Batch
2929
}
3030

work_unit.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ type WorkUnit interface {
1414
// Error returns the Work Unit's error
1515
Error() error
1616

17-
// Cancel cancels this specific unit of work, if not already committed to processing.
17+
// Cancel cancels this specific unit of work, if not already committed
18+
// to processing.
1819
Cancel()
1920

2021
// IsCancelled returns if the Work Unit has been cancelled.

0 commit comments

Comments
 (0)