change sync to detect deadlock

This commit is contained in:
YouROK
2020-12-28 12:41:09 +03:00
parent 611f9e955b
commit e026072067
9 changed files with 10 additions and 9 deletions

View File

@@ -2,8 +2,8 @@ package settings
import (
"encoding/json"
sync "github.com/sasha-s/go-deadlock"
"sort"
"sync"
"github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/metainfo"

View File

@@ -1,8 +1,8 @@
package torr
import (
sync "github.com/sasha-s/go-deadlock"
"log"
"sync"
"time"
"server/settings"

View File

@@ -2,7 +2,7 @@ package torrstor
import (
"fmt"
"sync"
sync "github.com/sasha-s/go-deadlock"
)
type buffer struct {

View File

@@ -1,8 +1,8 @@
package torrstor
import (
sync "github.com/sasha-s/go-deadlock"
"sort"
"sync"
"github.com/anacrolix/torrent"
"server/log"

View File

@@ -2,8 +2,8 @@ package torrstor
import (
"errors"
sync "github.com/sasha-s/go-deadlock"
"io"
"sync"
"time"
"github.com/anacrolix/torrent/storage"

View File

@@ -1,8 +1,8 @@
package torrstor
import (
sync "github.com/sasha-s/go-deadlock"
"io"
"sync"
"github.com/anacrolix/torrent"
"server/log"

View File

@@ -1,7 +1,7 @@
package torrstor
import (
"sync"
sync "github.com/sasha-s/go-deadlock"
"server/torr/storage"

View File

@@ -5,9 +5,10 @@ import (
"fmt"
"io"
"sort"
"sync"
"time"
sync "github.com/sasha-s/go-deadlock"
"server/log"
"server/settings"
"server/torr/state"

View File

@@ -1,7 +1,7 @@
package utils
import (
"sync"
sync "github.com/sasha-s/go-deadlock"
)
func ParallelFor(begin, end int, fn func(i int)) {