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

Windows build and SetDeadline deadlock fixes #72

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

Conversation

ddv2005
Copy link

@ddv2005 ddv2005 commented Apr 22, 2024

There are 2 fixes:

  1. accept.go can't be compiled under Windows because of missing syscall.SizeofSockaddrAny
  2. SetDeadline has deadlock because it calls pd.lock.Lock() at the start and then in unblock it tried to call pd.lock.Lock() again. But mutexes in go are different from posix because Go mutexes cannot be locked again even in the same thread/coroutine. Also, locks in poll.unblock are unnecessary and can be replaced by one SwapInt32 instead of load and store.

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.

1 participant