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

Pick a timer method #3

Closed
tansly opened this issue Dec 27, 2018 · 2 comments
Closed

Pick a timer method #3

tansly opened this issue Dec 27, 2018 · 2 comments
Assignees

Comments

@tansly
Copy link
Owner

tansly commented Dec 27, 2018

#1 and #2 implement the timeout mechanism in the broker in two separate ways. #1 uses SIGALRM, #2 uses a timer thread. Need to evaluate the pros and cons and pick one.

@tansly tansly self-assigned this Dec 27, 2018
@tansly
Copy link
Owner Author

tansly commented Dec 27, 2018

The signal mechanism has a dirty busy wait loop, but the thread mechanism is a giant bowl of 🍝.

@tansly
Copy link
Owner Author

tansly commented Dec 27, 2018

I'm going with the simple one, the signal mechanism.

@tansly tansly closed this as completed Dec 27, 2018
tansly added a commit that referenced this issue Dec 27, 2018
Implement timeout mechanism using SIGALRM

Addresses #3:
There is a dirty busy-waiting loop, but it is simpler than the threaded approach that I've come up with. The busy-wait may be eliminated later if possible.

Also addresses #4, possible premature return of recv().
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

No branches or pull requests

1 participant