Skip to content

add and run clock event loop#8

Merged
g11tech merged 3 commits intomainfrom
zeam-clock
Mar 21, 2025
Merged

add and run clock event loop#8
g11tech merged 3 commits intomainfrom
zeam-clock

Conversation

@g11tech
Copy link
Copy Markdown
Member

@g11tech g11tech commented Mar 16, 2025

add clock to primarily drive the client via libxev event loop

test usage: zeam clock

@g11tech g11tech requested a review from gballet March 16, 2025 12:16
Comment on lines +15 to +19
const mutex = Mutex{};

return Self{
.loop = loop,
.mutex = mutex,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const mutex = Mutex{};
return Self{
.loop = loop,
.mutex = mutex,
return Self{
.loop = loop,
.mutex = Mutex{},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are creating an object and copying it. Not a performance hit, but let's remove copies where we can.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the better pattren, i don't want to maintain the pointer/reference in the main eventloop struct?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no pointer here, and they are equivalent. It's just saving one line of code and a copy (that is probably not happening anyway as I'm sure the compiler gets rid of it for us)

gballet
gballet previously approved these changes Mar 20, 2025
Copy link
Copy Markdown
Contributor

@gballet gballet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@g11tech g11tech merged commit f0330f1 into main Mar 21, 2025
6 checks passed
@g11tech g11tech deleted the zeam-clock branch March 26, 2025 16:55
gballet added a commit that referenced this pull request Aug 8, 2025
Fixes #8

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
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