-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimpl psyncer #234
Reimpl psyncer #234
Conversation
Data interface{} | ||
Id string | ||
TaskId string | ||
TaskId string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to handle the result with out Data
?
taskdone chan struct{} | ||
stopnotify chan struct{} | ||
|
||
taskGenerators map[TaskType]func(args ...interface{}) (*SyncTask, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use sync.map to avoid race condition?
IDLE = 3 | ||
LOCAL_SYNCING = 4 | ||
CLOSE = 5 | ||
IDLE = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the index start from 1?
time.Sleep(time.Duration(v) * time.Millisecond) // add some random delay | ||
if sr.rumExchangeTestMode == false && sr.syncNetworkType == conn.PubSub { | ||
//Commented by cuicat | ||
//?? Do we need this in "real" network environment?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to add the random delay to avoid be QOS by remote peers.
No description provided.