-
Notifications
You must be signed in to change notification settings - Fork 1
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
WIP DISCUSS add engine of services #3
base: master
Are you sure you want to change the base?
Conversation
Quantity uint `json:"quantity"` | ||
Remain uint `json:"remain"` | ||
Price uint `json:"price"` | ||
Matchs []*Match `json:"-"` |
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.
typo Matchs -> Matches
|
||
func (e TradeExchangeEngine) publishEvent(event Event) { | ||
for _, l := range e.listeners { | ||
l.Listen(event) |
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.
The event handler and the engine are running on the same thread. It's better to leave the engine run alone.
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.
The event emitter looks good!
No description provided.