Skip to content

Commit

Permalink
remove mutexes
Browse files Browse the repository at this point in the history
  • Loading branch information
anjor committed Jul 10, 2024
1 parent c69cbde commit 07e1d2d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions cmd-car-split.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ func newCmd_SplitCar() *cli.Command {
)

createNewFile := func() error {
fileMutex.Lock()
defer fileMutex.Unlock()

if currentFile != nil {
subsetNode, err := qp.BuildMap(ipldbindcode.Prototypes.Subset, -1, func(ma datamodel.MapAssembler) {
qp.MapEntry(ma, "kind", qp.Int(int64(iplddecoders.KindSubset)))
Expand Down Expand Up @@ -164,9 +161,6 @@ func newCmd_SplitCar() *cli.Command {
}

writeObject := func(data []byte) error {
fileMutex.Lock()
defer fileMutex.Unlock()

_, err := currentFile.Write(data)
if err != nil {
return fmt.Errorf("failed to write object to car file: %s, error: %w", currentFile.Name(), err)
Expand Down

0 comments on commit 07e1d2d

Please sign in to comment.