Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

WIP DISCUSS add engine of services #3

wants to merge 4 commits into from

Conversation

emj365
Copy link
Owner

@emj365 emj365 commented Nov 25, 2020

No description provided.

Quantity uint `json:"quantity"`
Remain uint `json:"remain"`
Price uint `json:"price"`
Matchs []*Match `json:"-"`

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)

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.

Copy link

@reliveyy reliveyy left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants